Question

1
Replies
294
Views
Close popover
Shane Soderstrom (Shane Sody)
CR England

CR England
US
Shane Sody Member since 2018 16 posts
CR England
Posted: August 19, 2020
Last activity: August 20, 2020
Solved

How to convert UTC string date to GMT DateTime format

I have a JSON listener that gives me a string date in UTC format. My example date is: "2020-08-17T09:10:15.82". I want to be able to store this string date in a DateTime property. I have tried using:

@ParseDateStringToDate(.OpenDate)

@FormatDateTime(Primary.OpenDate,"YYYYMMdd",null,null)

@DateTime.FormatDateTime(Primary.OpenDate,"YYYYMMdd'T'HHmmsss","GMT","")

I have also tried other variations and methods. These all return 19700101T000000.000 GMT instead of their intended dates. Does anyone have a suggestion that I could try?

***Edited by Moderator: Pallavi to update platform capability tags***  

Pega Platform 8.4.1 User Experience