cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fhtech
Level: Powered On

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
Community Support Team
Community Support Team

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

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
Community Support Team
Community Support Team

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

fhtech
Level: Powered On

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
 
 

 

fhtech
Level: Powered On

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

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 292 members 3,617 guests
Please welcome our newest community members: