Help

Formula Assistance

Topic Labels: Automations
773 1
cancel
Showing results for 
Search instead for 
Did you mean: 
krtphr
6 - Interface Innovator
6 - Interface Innovator

Hello all,

I'm formulating a formula to get the total number of days requested for PTO. The current formula I have is:

DATETIME_DIFF({Event End}, {Event Start},'days')

The output of this displays the days, but also accounts for the weekend days as well which I don't want.

I have a separate table labelled: "Holidays" with a column for holidays showcasing the federal holidays with a format of "1/2/1991". I understand I'd need to use the WORKDAY_DIFF, but don't know how to incorporate that onto: DATETIME_DIFF({Event End}, {Event Start},'days').

Any help would be appreciated. 

1 Reply 1
CJSmith
7 - App Architect
7 - App Architect

Hi @krtphr, WORKDAY_DIFF replaces the DATETIME_DIFF operator, and holidays are added as a final component. You will, therefore, need to create a single field in the current table that includes all holiday dates (consider using a formula field for this so it carries over to all records created in the table). The formula would then look like this:

WORKDAY_DIFF({Event Start}, {Event End}, {Holidays})

 Hope this helps, but let me know if you have any questions! Linking to Airtable documentation for further reading.