Discussions

Expand all | Collapse all

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

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

    Posted 11-21-2017 19:22
    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


  • 2.  RE: Formula Checkfield to be true if a Date field is during the previous month.

    Posted 11-21-2017 21:00
    If(  FirstDayOfMonth([date])=FirstDayOfMonth(AdjustMonth(Today(), -1)),  true  )


  • 3.  RE: Formula Checkfield to be true if a Date field is during the previous month.

    Posted 11-21-2017 21:15
    That worked great!  Also, is there a way I can do this by Week to Date and/or by Previous Week?

    Thanks


  • 4.  RE: Formula Checkfield to be true if a Date field is during the previous month.

    Posted 11-21-2017 21:21
    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)


  • 5.  RE: Formula Checkfield to be true if a Date field is during the previous month.

    Posted 11-21-2017 21:58
    Perfect!  Thanks Dan for all of the help!

    Cheers,