cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Problem with ISO 8601 on a SharePoint date

Hello,

 

I'm struggling with a problem on a SharePoint date not in ISO 8601 format.

 

 formatDateTime('triggerBody()?["Created"]''dd/mm/yyyy hh:mm tt')
 
It returns that the submitted date/hour chain is not valid and must match the ISO 8601 format. I tried converting the date to ISO format using the convertToUtc() function, still returned that in order to use this function I need a valid date.
 
I'm really stuck with this issue, could someone help me figure this out please ?
1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @Anonymous ,

 

We should add '' outside Created and need to remove '' outside the triggerBody()?[‘Create’].

Image reference:

86.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
efialttes
Super User
Super User

Hi!

TRy this instead:

formatDateTime(triggerBody()?['Created'], 'dd/mm/yyyy hh:mm tt')

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Anonymous
Not applicable

Unfortunately it cannot help, there is a larger function around, at first I used the single quotes, still got me the same error.

 

 

Hi!

I am afraid the sintaxis from your first expression IS wrong.

You can simply add a dummy 'Compose' action block before the action block where your flow crashes, then assign my suggested expression as its input. REexecute the flow, see if it works

 

If it does, just share the whole expression (with the larger function around) so we can try to help putting the pieces together

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Jcook
MVP

Hello @Anonymous 

 

Can you try to use the Convert time zone action. This will ensure your format matches ISO format

pic1.png

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





v-bacao-msft
Community Support
Community Support

 

Hi @Anonymous ,

 

We should add '' outside Created and need to remove '' outside the triggerBody()?[‘Create’].

Image reference:

86.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

That worked like a charm, thank you ! 🙂

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,642)