Forum Discussion

bcloud's avatar
bcloud
Qrew Member
2 years ago

Case Statement with Dates always returns inital value

I am trying to use the following formula, but no matter what my Departure and Return dates are, the formula always returns the first value (ACTIVE).  What am I missing here?

Case(true,
([Departure Date]<=Today() and [Return Date]>=Today()), "ACTIVE",
([Departure Date]<Today() and [Return Date]<Today()), "PENDING",
[Return Date]<Today(), "INACTIVE")

Thanks in advance for the help!

------------------------------
Brian Cloud
------------------------------
  • Close, but you should be using an IF statement for this kind of test.

    IF(
    [Departure Date]<=Today() and [Return Date]>=Today(), "ACTIVE",
    [Departure Date]<Today() and [Return Date]<Today(), "PENDING",
    [Return Date]<Today(), "INACTIVE")


    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • bcloud's avatar
      bcloud
      Qrew Member
      Overcomplicating things I see...thanks for the assist!

      ------------------------------
      bcloud
      ------------------------------