Formula Checkfield to be true if a Date field is during the previous month.

  • 0
  • 2
  • Question
  • Updated 12 months ago
  • Answered
Greetings Quickbase,

I'm trying to create a formula checkfield that replicates the functionality of a Quickbase report.  I would like this field to be checked if some date field is during the previous month.

For example(the date of this posting is 11/21/2017):

                        * Formula CheckBox Field  |    Date Field
Record 1           Checked                         10/10/2017
Record 2          Unchecked                      11/03/2017
Record 3          Unchecked                       9/15/2017

Any suggestions or work arounds would be much appreciated!

Thanks,

Nate
Photo of Nate St. Elme

Nate St. Elme

  • 202 Points 100 badge 2x thumb

Posted 12 months ago

  • 0
  • 2
Photo of Dan

Dan

  • 1,176 Points 1k badge 2x thumb
If(
FirstDayOfMonth([date])=FirstDayOfMonth(AdjustMonth(Today(), -1)),
true
)
Photo of Nate St. Elme

Nate St. Elme

  • 202 Points 100 badge 2x thumb
That worked great!  Also, is there a way I can do this by Week to Date and/or by Previous Week?

Thanks
Photo of Dan

Dan

  • 1,176 Points 1k badge 2x thumb
You can do something like this to check for a date in the previous week:
if(
[Date]>=FirstDayOfWeek(Today()-Days(7)) and [Date]<=LastDayOfWeek(Today()-Days(7)),
true)
(Edited)
Photo of Nate St. Elme

Nate St. Elme

  • 202 Points 100 badge 2x thumb
Perfect!  Thanks Dan for all of the help!

Cheers,

This conversation is no longer open for comments or replies.