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 / Format Date and Time c...
Power Automate
Answered

Format Date and Time changes time

(0) ShareShare
ReportReport
Posted on by 12

Hi, I have been playing with this for some time and I Don't know what is the source of the issue to solve it.

I have SharePoint list which  has a start date and time field

I have a flow which reads these fields when an item modified or created and via API populates the value on another database.

 

I need to format the date to be able to put it on the database

this is the formula I use to format time

 

formatDateTime(triggerBody()?['Date'],'hhmm')
 
the problem is the output of this formula is 1 hour more than what I put in the list
for example I put 3:00pm and the formatDateTimeShows 4:00pm
and during daylight sayving it adds 2 hours
for example I put 3:00pm and the formatDateTimeShows 5:00pm
 
this is the setting I have in my site
2019-03-21_12-59-52.png
 

 

Any Idea how to fix this

Categories:
I have the same question (0)
  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @EhsanAliverdi ,

     

    This is because of the difference between the time zone you set and the default time zone of MS Flow.

    The recommended methods are the following two.

    • Use Convert time zone action to convert the time, as below:

    4.PNG

    • In addition, since you already know the time difference, you could use addHours() function to eliminate the time difference. And the third parameter can directly set the format of the time, like:
    addHours(triggerBody()['Date'],-1,'hhmm')

     

    Hope it helps.

     

    Best Regards,

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 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard