Is there way to show PST to UTC time format

Hello,

following date 

{
    "SiteId": "XXXX",
    "Identifier": "197128335067",
    "Quantity": 1,
    "Date": "2024-06-12T15:33:40-07:00",
    "TransactionId": "SO16811522",
    "Context": {}
  }

should be shown in the following "2024-06-12T22:33:40.4040Z”. ?

I tried using date format but not able to make it happen.

 
0

Comments

3 comments
Date Votes
  • Hi Harish Bakka

    I'm moving this post to the Troubleshoot custom flows section for more visibility! Thanks! 

    0
  • Work around

    {
    "Date_1":"{{dateFormat 'YYYY-MM-DDTHH:mm:ss.sss' Date 'YYYY-MM-DDTHH:mm:ssZ'}}Z"
    "Date_2": "{{dateAdd (dateFormat "YYYY-MM-DDTHH:mm:ss.sss" Date "YYYY-MM-DDTHH:mm:ssZ" "UTC")}}",
    "Date_3":"{{dateFormat 'YYYY-MM-DDTHH:mm:ss.sss' Date 'YYYY-MM-DDTHH:mm:ssZ' 'America/Los_Angeles'}}Z"
    }

    0
  • Harish Bakka you should put the Z in square brackets:

    {{dateFormat "YYYY-MM-DDTHH:mm:ss.ssss[Z]" Date "YYYY-MM-DDTHH:mm:ssZ"}}

     

    I'm not sure why you have the seconds repeating in the milliseconds position, but if you mean to just have zeros, then you can do:

    {{dateFormat "YYYY-MM-DDTHH:mm:ss.SSSS[Z]" Date "YYYY-MM-DDTHH:mm:ssZ"}}
    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post