Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
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

 

 

 

  • Ellis Karim Profile Picture
    10,912 Super User 2025 Season 1 on at
    Re: Unable to remove time from date format in HTML table

    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

     

     

  • cck11 Profile Picture
    2 on at
    Re: Unable to remove time from date format in HTML table

    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
    10,912 Super User 2025 Season 1 on at
    Re: Unable to remove time from date format in HTML table

    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.

     

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow