Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Birthday formula

Topic Labels: Formulas
Solved
Jump to Solution
799 4
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi people!

I’m building a “Birthdays” table in my “Calendar” base and I’m looking for a formula that says:

if “Birthday” is within the next 2 months then display “soon”

What would this formula look like?

scrnli_19_08_2022_11-39-41

1 Solution

Accepted Solutions

Sorry! More complicated than I first realised. Try this:

IF(AND(SUM(DATETIME_FORMAT(TODAY(), "M")-DATETIME_FORMAT({Birthday}, "M"))<=2, SUM(DATETIME_FORMAT(TODAY(), "M")-DATETIME_FORMAT({Birthday}, "M"))>-1), "Soon")

This should work for any date given in {Birthday}, regardless of year.

See Solution in Thread

4 Replies 4

IF(DATETIME_DIFF(TODAY(), {Birthday}, "months")<=2, "Soon")

Thanks Jonathan!

I’m still having a problem here. No errors from the formula but the formula labels ALL of the records as “Soon” in the formula field regardless of date.

Sorry! More complicated than I first realised. Try this:

IF(AND(SUM(DATETIME_FORMAT(TODAY(), "M")-DATETIME_FORMAT({Birthday}, "M"))<=2, SUM(DATETIME_FORMAT(TODAY(), "M")-DATETIME_FORMAT({Birthday}, "M"))>-1), "Soon")

This should work for any date given in {Birthday}, regardless of year.

It works! but I have to filter out next years birthdays or it goes a bit haywire and can’t be filtered using the “Soon” field once the formula is used.