Question

76
Views
Sreenivasulu Gundavarapu (Sreenivasulu Reddy)
Evonsys India Pvt.ltd
Sreenivasulu Gundavarapu
Evonsys India Pvt.ltd
IN
Sreenivasulu Reddy Member since 2017 1 post
Evonsys India Pvt.ltd
Posted: April 4, 2021
Last activity: April 5, 2021
Posted: 4 Apr 2021 2:16 EDT
Last activity: 5 Apr 2021 7:40 EDT

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

 

***Edited by Moderator: Pooja Gadige to move from Pega Academy to Product, add platform capability tag***
Pega Platform 8.5 User Experience