web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / DateTime and SQL Help!
Power Automate
Answered

DateTime and SQL Help!

(0) ShareShare
ReportReport
Posted on by 194
Hi Everyone
I have a flow that is pulling a LastModifiedOn column that is a DateTime in SQL on TABLE-A and updating another SQL table in the LastModifiedOn DateTime on TABLE-B.
 
Table-A DateTime is accurate as to when things happened, but when the flow runs to grab that datetime and put it in the other table it keeps adding 'Z' to the end and thus converting it to UTC. The time is 5 hours behind the time it's supposed to show. I tried to format doing these two methods and no change.:
 
 
formatDateTime(convertFromUtc(triggerOutputs()?['body/LastModifiedOn'], 'Eastern Standard Time'), 'yyyy-MM-ddTHH:mm:ss')
 
and I also tried this:
 
convertFromUtc(triggerOutputs()?['body/LastModifiedOn'], 'Eastern Standard Time')
 
 
 
Please help! When I run the flow it still shows 5 hours back with the Z at the end despite what the column from TABLE-A is showing.
Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,211 Super User 2026 Season 1 on at
    I don't do anything with updating SQL tables, but have your tried to copy the data by itself without an expression? If you were doing this with SharePoint, if you convert the time zone when you copy the data from one SharePoint list to another, what you say is happing would occur because SharePoint saves dates in the UTC format.
  • Verified answer
    Nicci Profile Picture
    194 on at
    Just in case this helps others, I finally figured it out! The correct thing to do is:
     
    formatDateTime(triggerOutputs()?['body/LastModifiedOn'], 'yyyy-MM-ddTHH:mm:ss')
     
    Just format it! I saw the Z so i just assumed it was converting to UTC, but if I format it then it doesnt convert, my original was just pointing to the column which for some reason it was converting to UTC, but formatting stopped it from converting and pulled the datetime from one and into the next. yay!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 573

#2
Valantis Profile Picture

Valantis 407

#3
11manish Profile Picture

11manish 387

Last 30 days Overall leaderboard