Skip to main content
Question

Case Statement with Dates always returns inital value

  • December 30, 2022
  • 0 replies
  • 42 views

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
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • December 30, 2022
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
------------------------------