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

System Datetime func. wrong due to YYYYMMdd mask (s/b yyyyMMdd)

SA-18245

Summary



User reports that @PegaRULES Date/Time function defaulting to 12/27/2016; which is causing their validation to fail and impacting their Make Payment functionality. This functionality is critical and due to this issue tuser cannot process the case further.
 

Error Messages



Not applicable.


Steps to Reproduce



Use the following function call and test during 12/27/2015 to 12/31/2015.
     @(Pega-RULES:DateTime).CurrentDate("YYYYMMdd")


Root Cause



The ISO standard for time incorporates a "week year" that is used for fiscal year calculations.

It is implemented using an uppercase "Y" in format masks. For example, the mask of YYYYMMdd returns "week year" and this can result in a difference of +1 or -1 from the actual year. This issue appears in any software that subscribes to ISO standard, such as Java and Pega.

Resolution



Change the current mask from YYYYMMdd to yyyyMMdd.

 

Published January 31, 2016 - 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