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

Error - The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.

I've read other posts regarding this error and nothing seems to be working. I keep getting this error "The string was not recognized as a valid DateTime. There is an unknown word starting at index 0." Doesn't really seem to do anything with the time though. I deleted those fields and I'm still getting it. Created a form, when it's submitted, details are obtained and a sharepoint item is created. It was working fine the day before and then all of the sudden, it's not. I'm using the forms submission date auto-generated. Can someone please help me to fix! Thank you!Screenshot # 1.jpgScreenshot #2.jpgScreenshot #3.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @mromeis,

 

I tried to reproduce your Flow, create a Date column set it not include time, and make it include time too, but they work well.

 

How about trying to use the formatDateTime() function to format it into 'yyyy-MM-ddThh:mm:ssZ'?

formatDateTime(body('Get_response_details')?['submitDate'],'yyyy-MM-ddThh:mm:ssZ')

Annotation 2020-06-24 110924.jpg

 

Best Regards,
Community Support Team _ Lin Tu
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

4 REPLIES 4
Hardesh15
Super User
Super User

@mromeis 

 

One thing you can do- use compose action and supply input your Form submission date.

Let me know what is your output.

 

Thanks

Hardesh

@Hardesh15  - I received the same error. Not sure what I'm doing wrong. 

screenshot #1.jpgscreenshot #2.jpg

@mromeis 

Output of you compose included time with date though your SharePoint date column has date only. SharePoint date column takes date in different format. I do not know what is your regional settings. But for GMT +5:30 it takes in dd-mm-yyyy format. 

You need to format your compose output using formatedatetime function in expression if required.

For you to get correct date format- create a test date column in SharePoint site and enter manual date in that column. You will get to know which format it is taking. Then supply that format here.

 

Thanks 

Hardesh

 

 

 

v-litu-msft
Community Support
Community Support

Hi @mromeis,

 

I tried to reproduce your Flow, create a Date column set it not include time, and make it include time too, but they work well.

 

How about trying to use the formatDateTime() function to format it into 'yyyy-MM-ddThh:mm:ssZ'?

formatDateTime(body('Get_response_details')?['submitDate'],'yyyy-MM-ddThh:mm:ssZ')

Annotation 2020-06-24 110924.jpg

 

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

 

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,007)