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

String to date conversion rejects European date

SA-25702

Summary



One user sees an issue where a date in the format 'DD/MM/YYYY' stored in a string property and then mapped to a date parameter results in an error - invalid datetime.

The functionality works fine for everyone else but this one user is facing the issue all the time.

Example date string:
"19/12/1980"

Users are in the UK so December 19th 1980 in the format above should be valid.


Error Messages

2016-07-14 15:25:06,630 {ABSOLUTE} [ WebContainer : 23] [Your_App:01:01] ( internal.mgmt.Executable) ERROR 127.0.0.1 - Exception
com.pega.pegarules.pub.clipboard.InvalidValueException: Invalid datetime format/Invalid datetime "19/12/1980"
at com.pega.pegarules.pub.util.PRDateFormat.parseAsDateTime(PRDateFormat.java:1317)
at com.pega.pegarules.pub.clipboard.PRStringFormat.pegaToDate(PRStringFormat.java:625)
at com.pega.pegarules.session.internal.mgmt.Executable.getParamAsDate(Executable.java:2694)

 

Steps to Reproduce



1. User is asked to enter date on screen in the format DD/MM/YYYY which is stored in a string property.
2. This value is then mapped to a date parameter which is used later on.



Root Cause

A defect or configuration issue in the operating environment: Browser was using the wrong locale.



Resolution



User's browser locale was set to US. After changing the browser locale to United Kingdom, the issue was no longer encountered.

Published July 28, 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