Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

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

  1. Use the function in data transform.
  2. 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

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us