Discussion

De Lage Landen International B.V.
NL
Last activity: 24 Jun 2020 11:32 EDT
Error while converting Clipboard page data to JSON for DateTime properties
Hi,
I am facing the below error while converting a clipboard page to JSON.
2020-01-28T07:06:36.225Z is not a valid date/time value
Found some similar article, however couldn't find the fix for this.
Also, when the system is converting a DateTime property with Pega Format (20190108T210539.613 GMT), pxConvertPageToString is converting it to below format.
2019-01-09T20:56:03.066Z
I do understand this is happening due to below code snippet, but want to understand how we can keep the DateTime property values to be in GMT format while converting in JSON.
aOptions.put(com.pega.pegarules.priv.clipboard.PegaClipboardPage.JsonFormatOptions.DateTimeFormat.toString(),com.pega.pegarules.priv.clipboard.PegaClipboardPage.JsonDateTimeFormatOptions.ISO_8601.toString());
Please suggest on above.
Thanks!!