cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RichardUchytil
Advocate I
Advocate I

How to convert Excel datetime value to SQL Server datetime?

I've got an Excel spreadsheet with Start and End datetime's.  In Excel they are formatted as "9/21/21 2:39PM".  In my flow I get the Excel table, list the ros from the table, and notice this time comes out as "44460.6110763889".  If I try to use that value in my SQL Server Insert Row step I get an error saying "We cannot convert the value "44460.6110763889" to type DateTime.".  At first I thought it's because of the quotes and I changed the value to a float, but I got the same error.

 

I have figured out how to change this to an integer and use addDays to get the date into SQL Server, however I need the time too.

 

How do I import the Excel datetime into SQL Server?  

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
CFernandes
Super User
Super User

Hey Mate,

 

I assume you are using List rows present in the table if yes just set the format in the action itself-

 

CFernandes_0-1642104713539.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

 

View solution in original post

2 REPLIES 2
CFernandes
Super User
Super User

Hey Mate,

 

I assume you are using List rows present in the table if yes just set the format in the action itself-

 

CFernandes_0-1642104713539.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

 

Ah, I missed that!  Thanks tons for the help!!!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (6,053)