Forum Discussion

PaulPeterson1's avatar
PaulPeterson1
Qrew Assistant Captain
6 years ago

Help needed working with dates.

I am new to QuickBase and need some help with a formula.   I found one component but need help with the rest.

The formula I am looking for will determine if a date is the last Thursday of a month.  

in plain text, the formula I am working with is something like:

IF(DayOfWeek(date) = 4 and (number of days in the month - Day(date) < 7)

The last piece of logic I need is a means of determining the number of days in a given month.

Thank you in advance.

------------------------------
Paul
------------------------------
  • np

    var number NumDaysInMonth = LastDayOfMonth([my date field]) - FirstdayOfMonth([my date field]) +1;

    DayOfWeek([my date field]) = 4 and ($NumDaysInMonth - Day([my date field]) < 7)

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • PaulPeterson1's avatar
      PaulPeterson1
      Qrew Assistant Captain
      Thank you, 

      Your solution was close to what I found shortly after posting,

      if(DayOfWeek(date) = 4 and (Day(LastDayOfMonth(date) - Day(date) < 7) ...

      The "LastDayOfMonth" was the piece I was missing. 

      Thank you for your help!

      ------------------------------
      Paul Peterson
      ------------------------------