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

Error while using PRDateFormat.parseXSDDateTime



Error occurs when using the PRDateFormat.parseXSDDateTime method in the AdoptJSONAndEnrichDecisionContext custom function.

Error Messages

custengfw_custengfwutils.AdoptJSONAndEnrichDecisionContext--(ClipboardPage,PublicAPI), Invalid format: "20170406T014656.235 GMT" is malformed at "4656.235 GMT"

Steps to Reproduce

Pass the DateTime value in the 20170406T014656.235 GMT format using the PRDateFormat.parseXSDDateTime method.

Root Cause

An issue in the custom application code or rules. The string argument for parseXSDDateTime() API was incorrect.


Here’s the explanation for the reported behavior:

In Pega 7.2.2, the PRDateFormat.parseXSDDateTime() parameter is according to the org.joda.time.format.DateTimeFormatter.parseDateTime().

Change the argument to parseXSDDateTime("2017-04-06T01:46:56.235").

For FormatDateTime and DateTimeDifference in Pega 7.3, the correct API specification is required.

Published March 22, 2018 - 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