Forum Discussion

SherryBlackbur1's avatar
SherryBlackbur1
Qrew Trainee
2 years ago

Formula for Cancellation Deadline (15th of month prior to month of date field)

In an app that allows users to book a shift: Users are allowed to cancel their shift up to the 15th of the month prior to their [shift date] - for example, if my [shift date] is 1/6/23, I cannot cancel it after 12/15/22.

I need either a date formula to calculate the cancellation deadline, or a rich text formula to show yes/no if the shift is able to be cancelled. Then I will use a form rule to hide the cancellation button if the cancellation deadline has passed.

I've turned this over and over in my brain and can't figure it out. Thanks in advance for your help! :)

------------------------------
Sherry Blackburn
------------------------------

2 Replies

  • MarkShnier__You's avatar
    MarkShnier__You
    Qrew #1 Challenger
    not tested but try this as a formula checkbox called
    [OK to Cancel Shift?]

    var date LastDateToCancel = AdjustMonth(FirstDayOfMonth([Shift Date]),-1) + Days(14);

    Today() <= LastDateToCancel

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------