Forum Discussion

JeffPeterson1's avatar
JeffPeterson1
Qrew Captain
5 years ago

Problem using DateTime field in formula for color coding

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
------------------------------
  • try this:


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



    ------------------------------
    Amber Polston
    ------------------------------
    • JeffPeterson1's avatar
      JeffPeterson1
      Qrew Captain
      I'm getting an error:  The operator '>' can't be applied on types datetime date


      ------------------------------
      Jeff Peterson
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        can you say bin worrds what the fomrula is suposed to do. The begining part here does not make sense.

        If([Due Date]>1+Today() "Reviewed", "Orange" ........


        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------