Skip to main content
Question

Problem using DateTime field in formula for color coding

  • October 1, 2020
  • 0 replies
  • 113 views

SSNJeffP
Forum|alt.badge.img+11
I'm trying to make a formula to control the colors on a report but I'm having trouble getting it to work.

Here is my code:

If([Due Date]>1+Today() "Reviewed", "Orange", [Due Date]>2+Today(), "Yellow", [Due Date]<Now(), "#ffcccb")

I'm getting errors that '>' cannot be used with Date or DateTime fields and I haven't had success using ToDate to convert it.  Any ideas how I might get this to work?

------------------------------
Jeff Peterson
------------------------------

  • Registered
  • October 1, 2020

try this:


If([Due Date]>Today()+Days(1), "Reviewed", "Orange", [Due Date]>Today()+Days(2), "Yellow", [Due Date]<Now(), "#ffcccb")



------------------------------
Amber Polston
------------------------------