Support Article
Issue with date format
Summary
Locale settings reference the date format as DD/MM/YYYY. However, the date format defaults to MM/DD/YYYY ( For example, 06/23/2019) in the email correspondence.
Error Messages
Not Applicable
Steps to Reproduce
Create a correspondence rule with a date control in it. Date displays with the MM/DD/YYYY format in the correspondence.
Root Cause
An issue in the custom application code or rules.
Resolution
Perform the following local-change:
- Click a source available in the Rich Text Editor (RTE) of the Correspondence rule
- Replace the <pega:reference format="Date" name=".ValidityStartDate"></pega:reference> source code in the correspondence rule with the below code:<%tools.appendString(PRDateFormat.format("xyz","xyz","dd/MM/yyyy",tools.getPrimaryPage().getDate(".ValidityStartDate")));%>
Note: In this case, the date property is ValidityStartDate.
Published December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.