ISO-8601 to Pega standard Date time Conversion

we are looking for a function which can convert any DateTime format to Pega Date/Time and was unable to find anything OOTB.

***Edited by Moderator Marissa to update platform capability tags****


Keep up to date on this post and subscribe to comments

March 26, 2019 - 6:10am

I tried below approach and it didn't work..

  org.joda.time.format.DateTimeFormatter  fmt = org.joda.time.format.DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
 outDateString = fmt.parseDateTime("20190322T204359.726 GMT").toString()...

Below error.

** Java Exception: 	java.lang.IllegalArgumentException: Invalid format: "20190322T204359.726 GMT" is malformed at "T204359.726 GMT" 

April 1, 2019 - 4:00am

Guys, any help here or can someone from Pega Systems confirm it and provide the recommendation..

April 10, 2019 - 4:26pm


Have you taken a look at the FormatDateTime rule utility function? With that can input a string, define the format it is currently using and the format you want to output. 


May 14, 2019 - 11:18am
Response to MikeTownsend_GCS

FormatDateTime can be used to convert a Pega date to an ISO-8601 formatted date but not the reverse.