Support Article
The fucntion addDays is not giving proper results
SA-32251
Summary
addDays function does not work as expected. The output value is 2016/10/05 instead of 2016/10/06 when using the function @(Pega-RULES:BusinessCalendar).addDays("20161005T000000.000 GMT",.TestInt,true,"USDefault").
Error Messages
Not Applicable
Steps to Reproduce
- Use the function in data transform.
- Check the output of @(Pega-RULES:BusinessCalendar).addDays("20161005T000000.000 GMT",.TestInt,true,"USDefault") function.
Root Cause
User is using USDefault calendar, hence the input date will be converted to USDefault timezone ie previous day in USDefault. It adds one day to it, which will be same day in GMT.
Resolution
Use AddTime function @(Pega-Rules:BusinessCalendar).addTime(Inputdate,No of days, Hours, mins,Secs, UseBusinessCalendar,Calendar name).
Published January 10, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.