Question

20
Views
Close popover
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: 2 weeks 4 days ago
Last activity: 2 weeks 3 days ago

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