Skip to main content

Notifications

Community site session details
Power Automate - Building Flows
Answered

How to convert Excel datetime value to SQL Server datetime?

Like (0) ShareShare
ReportReport
Posted on 13 Jan 2022 19:57:28 by 173

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!

  • Verified answer
    CFernandes Profile Picture
    8,295 Most Valuable Professional on 13 Jan 2022 at 20:12:13
    Re: How to convert Excel datetime value to SQL Server datetime?

    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.

     

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Automate - Building Flows

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 196 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 181 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 169

Overall leaderboard