cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

DateTime fields are seen as numbers not dates

I have a spreadsheet that contains three dates in the following format: m/d/yyyy h:mm:ss AM/PM.  My flow uses LIST ROWS PRESENT IN TABLE to get the data and then CREATE ITEM to add the data to the SP List.  Each Item is mapped, but when the flow is tested,  I get the following error: 

String was not recognized as a valid DateTime.  

Flow shows the output as follows, and notice date is brought in as a number not the date:

9-21-2019 2-28-15 AM.jpg

Any ideas the FormatDate Time as an expression but it did not work as talked about on the following link.  Not sure what I am doing wrong.

Does anybody know what this is?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: DateTime fields are seen as numbers not dates

Hi @fhtech ,

 

Please refer to link below to convert the string to date in flow:

https://powerusers.microsoft.com/t5/Building-Flows/Excel-Online-Date/td-p/134200

 

And the expression should be as below:

addDays('1900-01-01T00:00:00Z',sub(int(item()?['TheDateColumnTitle']),2))

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
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 III
Super User III

Re: DateTime fields are seen as numbers not dates

@fhtech 

The issue is that Excelstores dates differently than what Flow expects.

Hrere is a link to a post that discusses this issues as well as a solution.

 

 

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

Scott
Highlighted
Community Support
Community Support

Re: DateTime fields are seen as numbers not dates

Hi @fhtech ,

 

Please refer to link below to convert the string to date in flow:

https://powerusers.microsoft.com/t5/Building-Flows/Excel-Online-Date/td-p/134200

 

And the expression should be as below:

addDays('1900-01-01T00:00:00Z',sub(int(item()?['TheDateColumnTitle']),2))

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
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
Helper I
Helper I

Re: DateTime fields are seen as numbers not dates

Hi Alice,

 

thanks for replying.  I tried your suggestion and am getting a different error now:

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

Here is the function I used: 

addDays('1900-01-01T00:00:00Z',sub(int(item()?['ContractorAssignDate']),2))
 
Here is what I am seeing now:
9-23-2019 11-18-01 AM.jpg
Thanks, Reba
 
 

 

Highlighted
Helper I
Helper I

Re: DateTime fields are seen as numbers not dates

Disregard last message.  It worked and I accepted the Solution.

 

Thanks Alice!

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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
Top Kudoed Authors
Users online (8,412)