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

@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.

 

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,203)