Skip to main content
Solved

Formula for First Tuesday of the Previous Month


Forum|alt.badge.img+2

Hello,

 

Currently I have a date field called Date, I would like to make a formula that looks at this date and outputs the first Tuesday of the previous month.

Example
{date} - Shows March 13, 2025
Formula - Should show February 4, 2025 (First Tuesday of Previous Month)

I was able to find the 1st date of the previous month utilizing this, but I cannot seem to figure out how to get the first Tuesday.
 

DATETIME_FORMAT(DATEADD(DATEADD({Date}, -1, 'month'), -(DAY({Date}) - 1), 'days'),"MM/DD/YYYY")

 

Best answer by kuovonne

image.png

 

You are probably having trouble because you are using DATETIME_FORMAT() which is turning your date into a text string, which makes it difficult to perform additional math on it. If you remove the DATETIME_FORMAT() from your existing formula, you can use it as the {First of Previous Month} in this formula:

image.png

I did longer write-up here in Kuovonne's Guide to Airtable, and included a choice of formulas for both calculating the first of the previous month, and the first Tuesday.

View original
Did this topic help you find an answer to your question?

3 replies

kuovonne
Forum|alt.badge.img+17
  • Brainy
  • 5995 replies
  • Answer
  • March 14, 2025

image.png

 

You are probably having trouble because you are using DATETIME_FORMAT() which is turning your date into a text string, which makes it difficult to perform additional math on it. If you remove the DATETIME_FORMAT() from your existing formula, you can use it as the {First of Previous Month} in this formula:

image.png

I did longer write-up here in Kuovonne's Guide to Airtable, and included a choice of formulas for both calculating the first of the previous month, and the first Tuesday.


Forum|alt.badge.img+2
  • Author
  • New Participant
  • 1 reply
  • March 21, 2025

Hello ​@kuovonne thank you for the explanation, the longer write up was greatly appreciated and solved my problem.

 

This is what I utilized in the end.

Date Field labelled {Date}


First of Previous Month (Field Name)

DATEADD(
  DATEADD(
    {Date},
    -1 * (DAY({Date}) - 1),
    "days"
  ),
  -1,
  "month"
)

This output the 1st of the month prior

 

Then I added another field to find the 1st Tuesday.

 

First Tuesday of Previous Month (Field Name)

SWITCH( WEEKDAY({First of Previous Month}, "Sunday"),
0, DATEADD({First of Previous Month}, 2, 'days'),
1, DATEADD({First of Previous Month}, 1, 'days'),
2, DATEADD({First of Previous Month}, 0, 'days'),
3, DATEADD({First of Previous Month}, 6, 'days'),
4, DATEADD({First of Previous Month}, 5, 'days'),
5, DATEADD({First of Previous Month}, 4, 'days'),
6, DATEADD({First of Previous Month}, 3, 'days')
)

 

This outputted the first Tuesday of the previous month.

 

Thanks again!


Forum|alt.badge.img

You can start with the first day of the previous month and find the next Tuesday. In Excel or SQL, a combination of WEEKDAY() and DATEADD() should help Visit Auslandei. Have you tried adjusting based on the weekday value.


Reply