I want to be able to tell if a holiday is between two dates

I want to be able to have someone put in two dates and have a list of dates that are holidays and then for a formula to tell me their is 1 or 2 or etc holidays between the two dates you picked. i cant figure it out.

if date occurs during an array of days between to dates print "there is ‘X’ holidays during this time.

The only way that you could do this with a native Airtable formula (i.e. without writing a custom JavaScript) is to use the WORKDAY_DIFF function.

The WORKDAY_DIFF function completely ignores weekends, but it returns the number of days between 2 dates, and you can optionally specify whether it should skip over holiday dates (that you manually specify) in between those 2 dates.

So you would use that function twice (potentially in 2 different formula fields):

  1. The first time, use that function with no holidays specified.
  2. The second time, use that function with holidays specified.

Then, compare the difference between those 2 formulas, and you will see how many holidays fall in between the dates.

Again, this ignores weekends, so if you need weekends included, then you’re out of luck here and will need to turn to a custom JavaScript.

Here is a list of holidays you can use:

2 Likes

how do you create workday_diff with no holidays specified ?

The holidays section is optional, so you can just leave that part out.

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.