Skip to main content
Question

First Tuesday of the Month

  • April 10, 2023
  • 0 replies
  • 113 views

Hey everyone,

I've been trying around with this myself, but with no success. Does anyone know how to write a 'Formula - Checkbox' field that is only true if today = the first Tuesday of the month? 



------------------------------
Quickbase Admin
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24

Here is a formula date field which will calculate what the first Tuesday of the month is.  You can then compare it to your own date field to see if it matches. you will need to provide a date for [My Date field] or if you meant the first Tuesday of the current month, then you can use Today() there. 

There are probably ways to do this with a shorter formula but this has the advantage of being stupid simple and could be adjusted easily for a different first day of the month.



var date FirstOfTheMonth = FirstDayOfMonth([My Date field]);

Case(DayOfWeek($FirstOfTheMonth),
0, $FirstOfTheMonth + Days(2),
1, $FirstOfTheMonth + Days(1),
2, $FirstOfTheMonth + Days(0),
3, $FirstOfTheMonth + Days(6),
4, $FirstOfTheMonth + Days(5),
5, $FirstOfTheMonth + Days(4),
6, $FirstOfTheMonth + Days(3)) 



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