# Row colorization base on date (current, a day before, and past due)

• 0
• Question
• Updated 2 years ago
I am trying to create the following colorization based on a date field:
1 day prior to [ETA] & [Arrival Date] is empty = yellow
[ETA] = today's date & [Arrival Date] is empty = green
[ETA] date has passed & [Arrival Date] is empty = red

Thank you!
• 1,902 Points

Posted 2 years ago

• 0
• 516 Points
I think this will work in the colorization formula:

If([Arrival Date]=””,Case([ETA],1=ToDays([ETA]-Today()),”#ffff00”,[ETA]=Today(),”#00ff00”,ToDays([ETA]-Today())<0,”#ff0000”),””)
• 1,902 Points
This is what I got:

Formula syntax error

Please check the syntax of your entire formula. Possible culprits are a mismatched set of parentheses, missing quotes, or an extra bracket.

If([Arrival Date]=ToDate(""),Case([ETA],1=ToDays([ETA]-Today()),  ”#ffff00”,[ETA]=Today(),”#00ff00”,ToDays([ETA]-Today())<0,”#ff0000”),””)
• 75,144 Points
try this

If(
not Isnull([Arrival Date]), "",
ToDays([ETA]-Today()) = 1,  "#ffff00",
[ETA]=Today(),"#00ff00",
ToDays([ETA]-Today())<0,"#ff0000")

be sure you are using the straight double quotes and not the "66" "99" quotes which you see in Word.
• 1,902 Points
I did change the quotes, because I thought that was it, but this formula worked. Thank you!!
• 1,902 Points
Actually, had to change [ETA]=Today() to ToDays([ETA]-Today())>0, but I have what I need. Thanks again!
• 75,144 Points
OK great, I did not have the time to check your logic, only your syntax.