cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KevinRenaudeau
New Member

Power Automate understands my dates wrong

Hi everybody

 

ok so I have a weird problem with my dates format in PA. Power automate keeps "understanding" my dates in US format.

 

In a very simple flow I create a compose action with "10/05/2022" for exemple. Since my Microsoft account is set to display dates in "dd-MM-yyyy" I expect power automate to read this as 10th of May 2022 however it always understands it as 5th of october.

So in this simple flow I plug the output of the first compose action (10/05/2022) in an other compose action and use the expression "formatDateTime" with the dd-MM-yyyy format, and it systematically returns "05/10/2022".

The problem is that when I put 15/05/2022 in the first compose my flow fails and I get this message

 

InvalidTemplate. Unable to process template language expressions in action 'Compose_2' inputs at line '0' and column '0': 'In function 'formatDateTime', the value provided for date time string '15/05/2022' was not valid. The datetime string must match ISO 8601 format.'.

 

This is annoying as I work with documents only using the dd-MM-yyyy format, that most of the time are only strings... which means I get the wrong format or an error every time I'm dealing with dates.

 

Any idea of how I can get Power Automate to understand my dates properly? I have been checking some solutions on the forum but so far none was able to fix this.

 

Thanks in advance, y'all have a good one 

2 REPLIES 2
Foxxx
Frequent Visitor

I've got the same annoying issue. No fix found yet 😞

Aimee
Frequent Visitor

Try this--formatDateTime(body(‘Get_item)?[‘StartDate’], ‘yyyy-MM-ddThh:mm:ssZ’)

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (4,094)