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 / Date Format from Excel...
Power Automate
Answered

Date Format from Excel to HTML Table

(0) ShareShare
ReportReport
Posted on by 16

Hi,

 

After investigations in this forum and tests (Function formatDateTime) without no concrete results, I'am asking for help.

 

I have an Online Excel Table with Date.

Picture 1

 

I use this flow :

Picture 2

NB : I know the flow isn't maximized. It's just an example to create this case.

 

My objective : Send a weekly email with filtered informations and DATE

Problem : Dates aren't kept in a good format

Picture 3

 

How can I keep the date format from an excel to an HTML Table ?

 

Thanks for your help.

 

Best Regards,

Categories:
I have the same question (0)
  • LeeHarris Profile Picture
    1,026 on at

    Hi @Neicilef

     

    You should be able to control the format of your date field by using the FormatDateTime expression e.g.

    formatDateTime(triggerBody()['date'],'yyyy-MM-dd'). You mention you have looked at this already but it didn't work. What output did you get from this expression?
     
    The triggerBody()['date'] parameter is your Dynamic value from Excel so you would need to replace this. The 'yyyy-MM-dd' indicates that the date will be displayed in the format 2019-02-04. As long as the value from Excel is a valid date time, the format expression should ensure that the output in your HTML table is consistent.
     
    More information on date formats can be found here.
  • Neicilef Profile Picture
    16 on at

    Hi @LeeHarris

     

    Thank you for taking time.

     

    Below, my first test with input and ouput :

    1st Test Input

    1st Test Output

    Result : Not working

     

    Below, the test after your post

    Our Test Input

    Our Test Output

    Result : Not working

     

  • Verified answer
    LeeHarris Profile Picture
    1,026 on at

    Hi @Neicilef

     

    If you are using the Excel Online connector please take a look at this similar issue.

    https://powerusers.microsoft.com/t5/Building-Flows/Excel-dates-turned-into-integers/td-p/130364

    There is a comment suggesting the following expression as a workaround to the way Excel Online returns an integer representing the date as the number of days since 01/01/1900.

    addDays('1900-01-01',int(YourDateHere))

  • Verified answer
    Neicilef Profile Picture
    16 on at

    Hi @LeeHarris,

     

    I'm using indeed Excel Online.

     

    Thanks for the trick (Function addDays), it's almost working now.

     

    With the expression

    addDays('1900-01-01',int(item()['Date']))

    the result will be in the HTML Table : 2019-02-02T00:00:00.0000000

     

    Just for the format, I'm using now the expression :

    addDays('1900-01-01',int(item()['Date']),'yyyy-MM-dd')

    The result will be in the HTML Table : 02-02-2019

     

    BUT I had 2 days of difference between the date in the Excel and the HTML Table.

    So I'm using now : 

    addDays(addDays('01-01-1900',int(item()['Date'])),-2,'dd-MM-yyyy')
  • HarshavardhanG Profile Picture
    49 on at

    I have tried all the above solutions, but can't seem to get it working.

     

    I have raised a new post here: https://powerusers.microsoft.com/t5/Building-Flows/Format-timestamp-from-Excel-Online-to-send-mails/... 

     

    Can someone please guide me?

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard