cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Somanna
Regular Visitor

String was not recognized as a valid DateTime (When moving data from excel to SharePoint list)

Hello Members,

 

Hope you are safe. 

 

I have created the flow to move all my data in Table1 (Excel file) to the Sharepoint list. This excel file has few columns with dates.

I am getting "String was not recognized as a valid DateTime" error request your help here

Excel file

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

@ScottShearer 

 

For some reason i am unable to see the dynamic contents while writing the expression.Any idea what might be the reason for this?

Error.JPG

 

 

View solution in original post

kdavis91
Continued Contributor
Continued Contributor

@Somanna, were you able to solve your issue?

View solution in original post

8 REPLIES 8
ScottShearer
Super User III
Super User III

@Somanna 

Here is a link to a post that I believe will solve your problem.

 

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

@ScottShearer 

 

For some strange reason, I am unable to see the dynamic contents while writing the expression. Do you know what are the possible reasons for these kind of issue?

@ScottShearer 

 

For some reason i am unable to see the dynamic contents while writing the expression.Any idea what might be the reason for this?

Error.JPG

 

 

View solution in original post

kdavis91
Continued Contributor
Continued Contributor

@Somanna if you create a Compose action and pass in the date using Dynamic Content, then you can reference the output of that Compose in a second Compose when you write the expression.

Add Days Expression2.png

Check your date output though, I have found that the date needs to be '1899-12-31', not '1899-12-30' as the linked discussion board says, in order for the date to be correct in my outputs.

 

I hope this helps!

 

Kyle

kdavis91
Continued Contributor
Continued Contributor

@Somanna, were you able to solve your issue?

View solution in original post

Hello Davis @kdavis91 ,

 

Thank you this works perfectly fine i have follow up question or another requirement from my project team.

Now i want the date to be in DD/MMM/YYYY format. In this case when i do format date and time its not working. Its giving the same error which i used to get earlier. What should be the expression i should use to get **bleep**

kdavis91
Continued Contributor
Continued Contributor

Hello,

 

The format should look like this including the apostrophes: 'dd-MMM-yyyy'

 

The expression could be something like this: 

addDays('1899-12-31',int(outputs('Compose')),'dd-MMM-yyyy')

 

 

Also, if one of the responses here helped you solve your issue, might I suggest that you mark that response as the solution. It looks like you marked one of your own responses as the solution, and that response did not contain a remedy for the issue.

 

Let me know if this helps!

 

Thanks,

Kyle

Hello Kyel,

 

Sorry i marked the correct solution 🙂 . The date format change is not working is this because of my column type in the SharePoint is the Date&Time. the out put is in dd/MMM/yyyy format but when the item is created in the SharePoint its still going back to MM/dd/yyyy.

 

{
"@odata.etag": "\"1\"",
"ItemInternalId": "20",
"ID": 20,
"Client_x0020_Name": "Test2",
"Date_x0020_of_x0020_Report": "2020-03-29",
"Date_x0020_report_x0020_was_x002": "2020-03-29",

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

Users online (46,611)