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:
Here is my flow:
Here is the error:
@ekarim2020 Elis, thank you so much! I didn't realize the "item" addition was required. This did it!!! So happy.
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:
(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.
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.'.
stampcoin
61
Michael E. Gernaey
47
Super User 2025 Season 1
rzaneti
31
Super User 2025 Season 1