web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unable to remove time ...
Power Automate
Unanswered

Unable to remove time from date format in HTML table

(0) ShareShare
ReportReport
Posted on by 2

I am creating an HTML table from an excel table. One of my columns lists the date but the ISO 8601 format includes the time when all I need is the month/date/year. Does anyone know how to get the date to appear in a different format that does not include the time in the HTML table?  

 

cck11_0-1631818975929.png

 

 

 

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    I have the following Excel file that contains a Date column:

    ekarim2020_0-1631820707593.png

    Here is one method that uses the Select action and the formatDateTime to format the date to 'yyyy-MM-dd':

    2021-09-16_20-33-04 PA2.png

    We use item()['Date'] to refer to the Excel Date column:

     

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

     

    (Similarly item()?['Name'] refers to the Excel Name column, and item()?['Recommendation'] refers to the Recommendation column).

    Finally, add a Create HTML table action:

    ekarim2020_1-1631821897154.png

    Here is the output of the Create HTML table action showing dates without the timestamp:

    ekarim2020_5-1631822032320.png

    Ellis


    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

     

     

     

  • cck11 Profile Picture
    2 on at

    Thanks for your reply! I'm still having an issue getting this to run.

     

    I am getting this error message:

    The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{

      "Block": "@item()?['Block']",

      "Date": "@formatDateTime(item()?['Date'],'MM-dd-yyyy')",

      "Day": "@item()?['Day of Week']",

      "Rotation": "@item()?['Rotation']",

      "28 hr?": "@item()?['28h?']",

      "1/2 day?": "@item()?['1~12 Day']",

      "Level": "@item()?['PGY-1 or Resident']",

      "Status": "@item()?['Available']"

    }' failed: 'In function 'formatDateTime', the value provided for date time string '44462' was not valid. The datetime string must match ISO 8601 format.'.

     

    The format of the date column in the table I am selecting from looks like this: 

    cck11_0-1632251570349.png

    the Date column is pulling from another table in the same spreadsheet where the date is formatted "dd/mm/yyyy":

    cck11_1-1632251887102.png

     

     

     

     

     

     

     

  • Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    In your List rows present in a table action, specify the DateTime Format as ISO 8601:

    ekarim2020_0-1632254452657.png

    And run the flow again.

    Ellis

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard