
I have a datetime field (UTC) that I am trying to convert, but I'm having trouble with the correct syntax. The raw data from the datetime field that I am trying to convert looks something like this: 1646666296632
Here's what I have tried:
formatDateTime(string(items('Apply_to_each')['attributes']['CreationDate']),'dd-MM-yyyy')
To convert Unix Epoch clock time, try the following expressions:
addseconds('1970-1-1', Div(1646666296632,1000) , 'yyyy-MM-ddTHH:mm:ss')
--> 2022-03-07T15:18:16
addseconds('1970-1-1', Div(1646666296632,1000) , 'yyyy-MM-dd')
--> 2022-03-07
See: Got a recipe for converting a unix timestamp to a utc date
And see also Converting UTC Date Time to UNIX Time with Power Automate
https://ryanmaclean365.com/2020/08/03/converting-utc-date-time-to-unix-time-with-power-automate/
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.