Forum Discussion
XavierFan
12 years agoQrew Cadet
If the field is a date/time - use this formula:
If (ToDate([Next callback date/time (GMT)]) < ToDate(Now()), "red", ToDate([Next callback date/time (GMT)])> ToDate(Now()), "green", "yellow")
Here - both [Next callback date/time (GMT)] and the current date/time ("Now()") have been converted to a date with the "ToDate" function. Then it'll show "yellow" on the day it's due, and "red" if it's over due (i.e. the next day).
Keep in mind that "Now()" (and functions like "Today()" ) gives you the LOCAL date/time. So if your [Next callback date/time (GMT)] is entered using GMT time - just check to make sure it's doing the right thing when you have different time zones, etc.
If (ToDate([Next callback date/time (GMT)]) < ToDate(Now()), "red", ToDate([Next callback date/time (GMT)])> ToDate(Now()), "green", "yellow")
Here - both [Next callback date/time (GMT)] and the current date/time ("Now()") have been converted to a date with the "ToDate" function. Then it'll show "yellow" on the day it's due, and "red" if it's over due (i.e. the next day).
Keep in mind that "Now()" (and functions like "Today()" ) gives you the LOCAL date/time. So if your [Next callback date/time (GMT)] is entered using GMT time - just check to make sure it's doing the right thing when you have different time zones, etc.