Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

WEEKDAY as DATETIME_DIFF Unit

cancel
Showing results for 
Search instead for 
Did you mean: 
Brad_Johns
6 - Interface Innovator
6 - Interface Innovator

Yo Airtable Dev! You guys are doing amazing stuff…
I’d like to request, as the title suggests, adding ‘weekdays’ as a DATETIME_DIFF ‘unit’

My Use-Case

  • I’m writing a simple PTO log and request form, in the longer view, to track annual PTO usage blah-blah-blah. I know, PTO is so anachronistic…
  • Anyway, right now I use a request form with a begin date and end date query fields but in this case it is also necessary to ask, ‘how many work-days will you be gone?’ Which is kind of weird.
  • I would automate this process with a DATETIME_DIFF() formula field in the log if I could but I’ve not been able to come up with a way to eliminate weekends from that duration. Which could always be user error. Admittedly

This is really the equivalent of a function in Excel called NETWORKDAYS(), which if that’s easier to implement, I’m all for that too.

8 Comments
Julian_Kirkness
10 - Mercury
10 - Mercury

Hi Brad

It would be possible to work this out with a formula - it’s a similar problem to a thread I commented on a few days ago about adding a number of weekdays to a date:

Brad_Johns
6 - Interface Innovator
6 - Interface Innovator

Aha! Thanks Julian, I’d been thinking about an if statement for this…
That’s a great solution.
In terms of feature requests, it would be valuable to have something a bit
more modular (like, ‘weekdays’ as a unit) but this will help me get back to
work! Cheers.

Julian_Kirkness
10 - Mercury
10 - Mercury

I agree - but in the meantime at least there’s a way forward.

Andrew_Enright
9 - Sun
9 - Sun

+10 We too, need week/working days!

Julian_Kirkness
10 - Mercury
10 - Mercury

Although no announcement has been made, Workday_Diff() was made available as a function in December - you can even list other non-work dates in the function to exclude them.

Patricia_Li
5 - Automation Enthusiast
5 - Automation Enthusiast

I tried to post last week but my post got flagged and hidden for some reason :frowning: Trying again…

At long last we’ve added a WORKDAY_DIFF formula! Documentation here.

It takes in a start date, end date, and optional list of holidays, like so: WORKDAY_DIFF({Assignment date}, {Due Date}, '2017-09-04, 2017-10-09, 2017-11-10'), and returns the number of working days between the start date and end date, inclusive.

For those of you familiar with Excel or Sheets, it’s pretty much isomorphic to the NETWORKDAYS formula in those products.

Pallav_Purohit
4 - Data Explorer
4 - Data Explorer

Hi Patricia,

Is there any way where we can use this formula and can include Saturday’s in it? My use case is the employee leaves taken between two days which should include Saturday’s in.

DIFF({Start Date}, {End Date}, [Holidays + Saturdays])

[Holidays+Saturdays] can be added manually for a year.

Thanks.

Pallav

nnnnneil
8 - Airtable Astronomer
8 - Airtable Astronomer

Bump for WORKDAY_DIFF that supports additional units like hour, minutes etc.