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 / Error- The datetime st...
Power Automate
Unanswered

Error- The datetime string must match ISO 8601 format

(0) ShareShare
ReportReport
Posted on by 8

Hi, 

 

I have an issue with formatDateTime function.
Since last Sunday, this action
stopped working for me and I receive the error message: 

Unable to process template language expressions in action 'Compose-_TEST' inputs at line '1' and column '2898': 'In function 'formatDateTime', the value provided for date time string '15/03/2021' was not valid. The datetime string must match ISO 8601 format.'.

 

When I run the expression below:

formatDateTime(outputs('Compose')[0],'yyyy-MM-dd')
 
Can you please assist? 
This expression worked fine until last Sunday.
Categories:
I have the same question (0)
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @Liel 

     

    Is it possible that your error begain on 13th?  The reason I ask is that 13/03/2021 is not a valid date in a MM/dd/yyyy format as there are not 13 months in a year.  Where does your date in compose come from - is it a string?

     

    Damien

  • Liel Profile Picture
    8 on at

    Hi Damien, 


    Thanks for your quick answer.
    I receive the date as a string in format dd/mm/yyyy means that 15th is the current date in this case.
    Can I use formatDateTime function in this scenario? 
    You're right, if I change it to '03/15/2021' instead '15/03/2021'- it is working. 


    Regard,
    Liel

  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @Liel 

     

    You can re-organise your date string as follows:

    DamoBird365_0-1615895551425.png

    This runs as follows:

    DamoBird365_1-1615895593713.png

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


  • Liel Profile Picture
    8 on at

    Thank you, in this way it is working!

  • MWibisono Profile Picture
    75 on at

    I tried formatting date to yyyy-MM-dd, but it has to be the day I code, for example I want to format date 15-12-2023, but I did it on 14-12-2023, I got an error.

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard