Question
Accenture Services Pvt. Ltd.
IN
Last activity: 9 Nov 2022 7:01 EST
How to calculate difference between two dates with business calendar?
Unable to calculate the difference between business days even by using the business calendar function
(Pega-RULES:BusinessCalendar).differenceBetweenDates(.EDate,.SDate,true,CalendarName)+1)
(Pega-RULES:BusinessCalendar).differenceBetweenDays(.EDate,.SDate,true,CalendarName)+1)
* Please find the below are the scenario's
Scenario-1: (Not working)
startDate:03-04-2021(Saturday)
endDate:06-04-2021(Tuesday)
Expected difference is 2 days
But the return value is 3days
Scenario-2(Working Fine)
startDate:04-04-2021(Sunday)
endDate:06-04-2021(Tuesday)
Expected difference is 2 days
and the return value is 2 days
Scenario-3(Working Fine)
startDate:05-04-2021(Monday)
endDate:06-04-2021(Tuesday)
Expected difference is 2 days
and the return value is 2 days