Dec 31, 2020 06:05 AM
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.
Dec 31, 2020 08:16 AM
if date occurs during an array of days between to dates print "there is ‘X’ holidays during this time.
Dec 31, 2020 09:00 AM
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):
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:
Dec 31, 2020 09:15 AM
how do you create workday_diff with no holidays specified ?
Dec 31, 2020 11:26 AM
The holidays section is optional, so you can just leave that part out.