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.
Hi @harishbakka,
I'm moving this post to the Troubleshoot custom flows section for more visibility! Thanks!
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"
}
@harishbakka 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"}}