cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Problem with ISO 8601 on a SharePoint date

 

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
Highlighted
Dual Super User
Dual Super User

Re: Problem with ISO 8601 on a SharePoint date

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!



Highlighted
Frequent Visitor

Re: Problem with ISO 8601 on a SharePoint date

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

 

 
Highlighted
Dual Super User
Dual Super User

Re: Problem with ISO 8601 on a SharePoint date

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!



Highlighted
Super User
Super User

Re: Problem with ISO 8601 on a SharePoint date

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!





Highlighted
Community Support
Community Support

Re: Problem with ISO 8601 on a SharePoint date

 

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

Highlighted
Frequent Visitor

Re: Problem with ISO 8601 on a SharePoint date

That worked like a charm, thank you ! 🙂

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (9,902)