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 / How to compare dates w...
Power Automate
Answered

How to compare dates without getting the The datetime string must match ISO 8601 format.' error?

(0) ShareShare
ReportReport
Posted on by 2,297

There are lots of other similar posts, but I have tried lots of different things and can't fix this error:

WebPortal_0-1674329231876.png

 

The condition is comparing dates in the format dd-mm-yyyy.


When it reaches the 13th of JANUARY 2023, I get this error.

 

InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'In function 'formatDateTime', the value provided for date time string '13-01-2023' was not valid. The datetime string must match ISO 8601 format.'.

 

So, I've tried formatDateTime(date, 'dd-MM-yyyy') and 'yyyy-MM-dd' and ticks and also ConvertToUTC.

What else is necessary to simply compare two dates???

 

 

Categories:
  • Verified answer
    RobElliott Profile Picture
    10,547 Super User 2026 Season 2 on at

    @WebPortal if you always compare dates using the format yyyy-MM-dd then you won't get that error.

  • WebPortal Profile Picture
    2,297 on at

    @RobElliottthat's right. I'm learning the hard way..

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard