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

Incorrect date retrieved for CurrentDateTime function

SA-71788

Summary



Incorrect date is retrieved when using the below function.

.pyLabel -- @DateTime.FormatDateTime(@DateTime.CurrentDateTime(),"dd-MMM-YY","","")+" 00:00:00"

For example,

The function retrieves 31 DEC 19 instead of 31 DEC 18.


This function is used in a property-set in an activity and the value is set to the .pylabelToday property.


Error Messages



Not Applicable


Steps to Reproduce



Not Applicable


Root Cause



A defect in Pegasystems’ code or rules.


Resolution



Perform the following local-change:

Use 'dd-MMM-yy' instead of 'dd-MMM-YY' in the below string to set the pyLabel property.

@DateTime.FormatDateTime(@DateTime.CurrentDateTime(),"dd-MMM-YY","","")+" 00:00:00"



 

Published January 23, 2019 - 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