- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jul 17, 2023 11:18 AM - edited ‎Jul 17, 2023 11:20 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jul 17, 2023 01:50 PM
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.
