Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Format time in HTML table

Hello, I am having an HTML table created with a date, but I would like the date to be formatted differently so that it is displayed in German format as DD-MM-YYYY, how can I achieve this. In addition, if the date is greater than the current date, I would like it to be colored or highlighted in red, how could I implement this? Thanks





In the email you should not be using the output of the HTML table. But the output of the compose action which replaces the special characters.

@Paulie78  I have update my last Post ,

i use in the Outlook Body this 


this is from the compose.

The Email contains this




Is this right?





Helper III
Helper III

@Paulie78  Hi,

can you tell me what my fault?

I cannot see where you have gone wrong easily. But if you want I will take a quick look for you on teams. I am sure we can sort it out within a few minutes. Send me a PM if you want to do that.

@Paulie78 I have write you a PM


Thank you

Hello, unfortunately I still could not solve the problem.

I use the code of @Paulie78 from Post 19 to create the HTML Table

  greater(if(equals(item()?['dueDateTime'], null), '', formatDateTime(item()?['dueDateTime'],'dd-MM-yyyy')), utcNow()), 
  concat('<span style="color:red">', item()['dueDateTime'], '</span>', item()['dueDateTime']),
  if(equals(item()?['dueDateTime'], null), '', formatDateTime(item()?['dueDateTime'],'dd-MM-yyyy'))

 but the "Fällig" dosen't be red if the Value is greater then today.




In the next step "Verfassen" i use this code from @Paulie78 from Post 10 

replace(replace(replace(body('HTML-Tabelle_erstellen'), '&lt;', '<'), '&quot;', '"'), '&gt;', '>')


and then i create my Email

with this code 

table, th {
    border:1px solid black;        
td {
    border:1px solid black;
0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=Nicht begonnen<br>
50 &nbsp;&nbsp;&nbsp;=in Bearbeitung</strong><br>
<strong>100 = Abgeschlossen</strong><br>

"Ausgabe" is from "Verfassen"



then i become a Email, but as I wrote, the due date is not marked in red if the date is later than the current date and the individual fields in the table are not filled correctly as can be seen in the picture.



Who is my fault, and how i can correct it?


Thank you for your help.



Helper III
Helper III

Anybody a Tip for me?

Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (6,416)