cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlexandreBlack
Frequent Visitor

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 @AlexandreBlack ,

 

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 III
Super User III

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!



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
Super User III
Super User III

Hello @AlexandreBlack 

 

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 @AlexandreBlack ,

 

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

That worked like a charm, thank you ! 🙂

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (77,971)