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

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

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

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

@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

Highlighted
Frequent Visitor

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

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

screenshot #1.jpgscreenshot #2.jpg

Highlighted
Super User
Super User

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

@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

 

 

 

Highlighted
Community Support
Community Support

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

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (7,080)