Hi,
I have been trying to send an email using an HTML table to send a report. however, the hours appear in the wrong format,
[email result]
inside the excel I'm using the hour format 12:00 AM
[Excel data]
Can I use some kind of code inside the HTML creation?
could you please help me?
Thank you
br,
Solved! Go to Solution.
Hi @Kamacete how are you?
Following the suggestion sent by @ScottShearer I did a small modification to use a simple function to split the value, doing some calculations and formatting the result.
Take a look on my sample:
The formula used for the item1 was:
formatDateTime(string(addSeconds(addDays('1899-12-30',int(split(items('Apply_to_each')?['time1'],'.')[0])),int(string(mul(float(concat('.',split(items('Apply_to_each')?['time1'],'.')[1])), 86400))))),'HH:mm tt')
Please let me know if it helped to answer your question and please mark the answer.
Regards.
Rodrigo Hentz
Microsoft Support Engineer
The issue you are experiencing is due to how Excel stores dates (number of says since 1/1/ 1900).
Here is a link to a Blog post that may help.
Hi @Kamacete how are you?
Following the suggestion sent by @ScottShearer I did a small modification to use a simple function to split the value, doing some calculations and formatting the result.
Take a look on my sample:
The formula used for the item1 was:
formatDateTime(string(addSeconds(addDays('1899-12-30',int(split(items('Apply_to_each')?['time1'],'.')[0])),int(string(mul(float(concat('.',split(items('Apply_to_each')?['time1'],'.')[1])), 86400))))),'HH:mm tt')
Please let me know if it helped to answer your question and please mark the answer.
Regards.
Rodrigo Hentz
Microsoft Support Engineer
Yesterday I press accept solution by mistake.
😞
my bad
I tried your suggestion, and this what I get:
"formatDateTime(string(addSeconds(addDays('1899-12-30',int(split(items('Apply_to_each')?['Sites Lock'],'.')[0])),int(string(mul(float(concat('.',split(items('Apply_to_each')?['Sites Lock'],'.')[1])), 86400))))),'HH:mm tt')"
Can I insert for 24h, and not for 12h (AM/PM)
thank you for both
I have a similar problem with formatDateTime functio and 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 you please guide me?
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
14 | |
4 | |
4 | |
4 | |
4 |
User | Count |
---|---|
12 | |
6 | |
5 | |
5 | |
5 |