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?
In your List rows present in a table action, specify the DateTime Format as ISO 8601:
And run the flow again.
Ellis
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:
the Date column is pulling from another table in the same spreadsheet where the date is formatted "dd/mm/yyyy":
I have the following Excel file that contains a Date column:
Here is one method that uses the Select action and the formatDateTime to format the date to 'yyyy-MM-dd':
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:
Here is the output of the Create HTML table action showing dates without the timestamp:
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional