Skip to main content
Community site session details

Community site session details

Session Id : drj9foJO6p91kSELFwnXoX
Power Automate - Building Flows
Answered

Insert row into SQL flow saves dates minus one day

Like (0) ShareShare
ReportReport
Posted on 19 May 2022 16:33:16 by 6

I built a flow to take data from an excel file and insert it into a SQL table. However, when I check the data saved into the SQL table all the dates are minus one day. 

medellsi24_0-1652977868320.pngmedellsi24_1-1652977874628.png

Following is the comparison between excel and the SQL table. 

medellsi24_2-1652977913102.png

medellsi24_3-1652977922287.png

Does anyone have a suggestion on how to address this or if it could be caused by the insertion into SQL itself?

 

Thanks

 

  • Heartholme Profile Picture
    1,278 Super User 2024 Season 1 on 24 May 2022 at 07:03:56
    Re: Insert row into SQL flow saves dates minus one day

    Perfect 🙂 Glad to hear!

  • medellsi24 Profile Picture
    6 on 23 May 2022 at 20:09:45
    Re: Insert row into SQL flow saves dates minus one day

    Thanks for that information, I was able to work around this by using formatDateTime to only pass on the date without a time zone for example: formatDateTime(ITEM()?['QTRBEG'], 'MM-dd-yyy').

  • Verified answer
    Heartholme Profile Picture
    1,278 Super User 2024 Season 1 on 20 May 2022 at 06:13:39
    Re: Insert row into SQL flow saves dates minus one day

    Hi @medellsi24 

     

     

    The issue is that if you set the default date as a text value with no time component and time zone set to UTC (the 'Z' at the end), it will convert to a Date value, and the date will be converted to a date in the local time zone. If you are anywhere west of UTC (i.e., almost all of the Western hemisphere, incluinding the Americas), then it will end up in the day before. 

     

    Could you add a compose to extract out the date and we can look into reformat it to not jump a day. 


    Best Regards
    Heartholme

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete