Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Translation Quality Feedback
Suggested answer

I get not the local time from the automate back

(0) ShareShare
ReportReport
Posted on by 901
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?
 
Categories:
  • Chriddle Profile Picture
    7,839 Super User 2025 Season 1 on at
    I get not the local time from the automate back
    Just replace utcNow() with triggerBody()?['DateTimeReceived'] in your expression.
  • frixel Profile Picture
    901 on at
    I get not the local time from the automate back
    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.
     
  • Suggested answer
    David_MA Profile Picture
    11,661 Super User 2025 Season 1 on at
    I get not the local time from the automate back
    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
    901 on at
    I get not the local time from the automate back
    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 
  • frixel Profile Picture
    901 on at
    I get not the local time from the automate back
    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
     
  • Chriddle Profile Picture
    7,839 Super User 2025 Season 1 on at
    I get not the local time from the automate back
    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
    901 on at
    I get not the local time from the automate back
    Hi @Chriddle
     
    Now i get this.

     
    But i get then this error.

  • Chriddle Profile Picture
    7,839 Super User 2025 Season 1 on at
    I get not the local time from the automate back
    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.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

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

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492

Featured topics