Question

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****

Comments

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

Hello,

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. 

Thanks,
Mike