web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / 'formatDateTime' expec...
Power Automate
Unanswered

'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Integer'

(0) ShareShare
ReportReport
Posted on by

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')

 

djourney_0-1646751484238.png

 

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    12,098 Super User 2026 Season 1 on at

    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

    https://powerusers.microsoft.com/t5/Building-Flows/Got-a-recipe-for-converting-a-unix-timestamp-to-a-utc-date/m-p/138599/highlight/true#M13732

     

    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.

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 470

#2
Haque Profile Picture

Haque 416

#3
David_MA Profile Picture

David_MA 344 Super User 2026 Season 1

Last 30 days Overall leaderboard