Skip to main content
Solved

Duration of 2 dates calculated with only business days

  • April 25, 2023
  • 4 replies
  • 34 views

Forum|alt.badge.img+3

I'm trying to use the datetime_diff formula to configure a field similar to the ootb duration field in Smartsheet, but in Airtable.

I have a start-date and and end-date field. My goal is to have a duration field show the number of days between the start and the end dates.

Here are my constraints. 1) I want to be able to show only weekdays. 2) If the start date and the end date are the same I want the duration to equal 1, not 0.

Any suggestions?

Best answer by TheTimeSavingCo

You can use `WORKDAY_DIFF()` for that I think:

WORKDAY_DIFF(Start,End)

4 replies

TheTimeSavingCo
Forum|alt.badge.img+31

You can use `WORKDAY_DIFF()` for that I think:

WORKDAY_DIFF(Start,End)

Forum|alt.badge.img+3
  • Author
  • New Participant
  • April 26, 2023

You can use `WORKDAY_DIFF()` for that I think:

WORKDAY_DIFF(Start,End)

Yep, that's it. Thanks!


Forum|alt.badge.img
  • New Participant
  • July 27, 2023

how if the start date and end date falls in different month for this case? Thank you in advance.


TheTimeSavingCo
Forum|alt.badge.img+31

how if the start date and end date falls in different month for this case? Thank you in advance.


@CTSI think it'll work fine even if they have different months