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 gotten fro...
Power Automate
Answered

Format date gotten from excel table

(0) ShareShare
ReportReport
Posted on by 105

Hi,

 

I created a flow to send a table via email. One of the column is date but some dates are not in the correct format.

 

wlinb_2-1689664690001.png

 

wlinb_0-1689664544437.png

 

Output in the email:

wlinb_1-1689664566913.png

The last review date is suppose to be 7/9/2024 but it becomes 45542.

Anyone knows how can I format the date to make it consistent?

Thank you!

 

Categories:
  • Sundeep_Malik Profile Picture
    6,501 on at

    Hey   @wlinb 

    When handling Excel dates you will have to do 2 things.

     

    1) When using List rows in a table, In date time format always give ISO8601

    Sundeep_Malik_0-1689667227621.png

    2) Second thing instead of directly writing next review date write an expression similar to below:

     

    if(empty(item()?['NextReviewDate']),null,addDays('1899-12-30',int(item()?['NextReviewDate']),'yyyy-MM-dd'))

    Giving you links where you can read more about it:

    https://www.shanebart.com/ms-flow-excel-dates/

    https://tomriha.com/how-to-get-date-from-excel-as-a-date-in-power-automate-flow/

    https://www.youtube.com/watch?v=uFZxXMuLj-E

     

    I hope this helps 🙂

     

  • wlinb Profile Picture
    105 on at

    Hi @Sundeep_Malik ,

     

    Thank you for your advice.

    Not all of my date output is integer, so this formula is not working for me. 

    I have set the date time format to ISO8601 and all my dates in the excel to the right format. 

     

    Right now I'm getting this if I input the next review date directly.

    wlinb_1-1689758738101.png

    wlinb_0-1689758598684.png

    Do you know how can I remove the T*******Z and get only the date itself?

    I tried to use formatdatetime() but it only gives  me one date for all the rows

     

     

     

     

  • Verified answer
    Sundeep_Malik Profile Picture
    6,501 on at

    @wlinb 

     

    The expression for next review date would be

    formatDateTime(item()['nextreviewdate'], 'MM-dd-yyyy')

     

    Replace item()['nextreviewdate'] with the exact column name or just copy the dynamic expression you have currently written in select action and replace it with the above. As your field name has spaces could be possible it has x200 something in the field too. 

    If you don't know how it is add value coming from list rows action in a compose and see what field name you are getting.

    And also replace the format with whatever format you want.

     

  • wlinb Profile Picture
    105 on at

    Hi @Sundeep_Malik ,

     

    It works. Thank you! 

  • zeeman05 Profile Picture
    8 on at

    Hi @wlinb

     

    I am having the same issue as you. My values are coming in the T*******Z format as well. I performed all the above troubleshoot. However, were not able to fix the issue.

     

    Any help is much appreciated @Sundeep_Malik @wlinb 

     

    Best   

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 275 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 178 Super User 2026 Season 2

Last 30 days Overall leaderboard