Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
New-here1
Contributor III
Contributor III

Conditional Formatting on a date

Hi,

I have 3 fields in a table:

Date Started (example 11/07/2022 11:44:08)

Date Ended (example 13/07/2022 12:14:03)

Time Difference (example 02 00:25:55)

The time difference table shows the difference between the date started and date ended tables so, 2 days, 25 mins and 55 seconds 

I would like to highlight anything in red that takes over 1 day.

What would be the best code to use for this please?

Labels (1)
1 Solution

Accepted Solutions
rubenmarin

Hi, you can set a background color expression like:

If([Date Ended]-[Date Started]>1, RGB(255,199,206))

Or: If([Time Difference]>1, RGB(255,199,206))

View solution in original post

4 Replies
brunobertels
Master
Master

hi 

try this 

interval([Date Ended]-[Date Started],'d hh:mm:ss')

interval('13/07/2022 12:14:03'-'11/07/2022 11:44:08','d hh:mm:ss')

brunobertels_0-1699878878025.png

 

 

 

New-here1
Contributor III
Contributor III
Author

Hi Bruno, 

Thank you for the suggestion, I have done this already to get the result in the 3rd field but I would like to know how to highlight anything that is over 1 day in red.. 

Thank you

rubenmarin

Hi, you can set a background color expression like:

If([Date Ended]-[Date Started]>1, RGB(255,199,206))

Or: If([Time Difference]>1, RGB(255,199,206))

New-here1
Contributor III
Contributor III
Author

Thank you Ruben, that worked!