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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (2,544)