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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / "The datetime string m...
Power Automate
Unanswered

"The datetime string must match ISO 8601 format"

(0) ShareShare
ReportReport
Posted on by 173

I would like to reformat the date to a friendly format.

 

I am getting the error "the value provided for date time string 'Deadline' was not valid. The datetime string must match ISO 8601 format.'." I have a date and time field that shows the deadline in this format "2022-01-14T04:59:00Z". I tried converting timezone, and also using the following format date time: 

formatDateTime('Deadline','yyyy-MM-dd')
 
I understand that an ISO 8601 format is always formatted as yyyy-MM-dd. However, I can't figure out how to fix the reformatting formula. Or maybe it's another issue?
 

Here is my flow:

oaghaei_0-1633399127768.png

 

Here is the error:

oaghaei_1-1633399294225.png

 

 

Categories:
I have the same question (0)
  • Priyae Profile Picture
    on at

    Hey @oaghaei ,

    Check the solution here for your need : 

    Solved: Error- The datetime string must match ISO 8601 for... - Power Platform Community (microsoft.com) 

     

    Thanks

  • oaghaei Profile Picture
    173 on at

    Hello @pre - thank you for your response. I tried to formatdate because I thought maybe its a simpler solution: 

    formatDateTime('Deadline','MM/dd/yyyy')

     

    However, when I pipe that into the html table, it gives me the following error. Do you think the solution you are proposing with splitting the date would solve this?

    InvalidTemplate. The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{ "Opportunity Title": "@item()?['Title']", "Deadline": "@formatDateTime('Deadline','yyyy-MM-dd')", "Agency": "@item()?['Agency_x0020__x0028_full_x0020_n/Value']", "Category ": "@item()?['Category/Value']", "Amount": "@item()?['Award']", "Homepage": "@item()?['Homepage_x0020_link']" }' failed: 'In function 'formatDateTime', the value provided for date time string 'Deadline' was not valid. The datetime string must match ISO 8601 format.'.

  • Verified answer
    Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    The expression is trying to format the text 'Deadline' as MM/dd/yyyy.

    The expression needs to refer to the SharePoint field Deadline using item()?['Deadline'] in the expression:

    2021-10-05_19-11-21.jpg

    (I'm guessing that the SharePoint field is called Deadline.)


    Ellis

     


    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • oaghaei Profile Picture
    173 on at

    @ekarim2020  Elis, thank you so much! I didn't realize the "item" addition was required. This did it!!! So happy.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard