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 / I get not the local ti...
Power Automate
Suggested Answer

I get not the local time from the automate back

(0) ShareShare
ReportReport
Posted on by 1,089
Hello,
 
I have the Power Automate below but I don't get the correct local time in the Excel table.

The correct time is in the received message but as soon as it goes through the Power Automate I have an incorrect time in the sheet.
 
What can I change?
 
I have the same question (0)
  • Chriddle Profile Picture
    8,690 Super User 2026 Season 1 on at
    The date probably is in UTC.
    Use convertFromUtc() to convert to your local time zone.
     
    If the according Excel column is formated as DateTime, don't use a format string but set the Excel connector's DateTime Format to ISO 8601 (in the connector's advanced options) and set the values display settings within Excel.
  • frixel Profile Picture
    1,089 on at
    Hi @Chriddle
     
    Now i get this.

     
    But i get then this error.

  • Chriddle Profile Picture
    8,690 Super User 2026 Season 1 on at
    The error is from the addHours() function and it states that the datetime value is null.
    This shouldn't happen. Are you sure that you are processing triggerOutputs()?['body/receivedDateTime']
     
    Furthermore 
    Why do you still add 2 hours?
    Why do you convert utcNow() to local time. Isn't this about triggerOutputs()?['body/receivedDateTime']?
  • frixel Profile Picture
    1,089 on at
    i don`t understand 😢
     
    When i don`t use the '2' in: 
     
    addHours(triggerBody()?['DateTimeReceived'],'dd-MM-yyyy HH:mm:ss')
     
    then i get this error
     
  • frixel Profile Picture
    1,089 on at
    When i do this then i get the right time
     
    addHours(triggerBody()?['DateTimeReceived'],1,'dd-MM-yyyy HH:mm:ss')
     
    So i think i must 
    addHours(triggerBody()?['DateTimeReceived'],'dd-MM-yyyy HH:mm:ss')
    combine with 
    utcnow() 
     
    is that what it is, i don`t know how to do that 
  • Suggested answer
    David_MA Profile Picture
    14,644 Super User 2026 Season 1 on at
    I believe your problem Is caused because your expression is not valid. The expression needs to include T in the expression: addHours(triggerBody()?['DateTimeReceived'],'yyyy-MM-ddTHH:mm:ss')
  • frixel Profile Picture
    1,089 on at
    I can do this 
    convertTimeZone(utcnow(),'UTC','W. Europe Standard Time','dd/MM/yyyy HH:mm:ss')
    in the expression what is working with the right time and date in the Excel sheet
     
    But than it takes NOT the time that the eMail is received.
     
  • Chriddle Profile Picture
    8,690 Super User 2026 Season 1 on at
    Just replace utcNow() with triggerBody()?['DateTimeReceived'] in your expression.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 582

#3
Haque Profile Picture

Haque 529

Last 30 days Overall leaderboard