Skip to Main Content

Share your product feedback

Add option in datediff function to exclude weekends when counting days

The datediff function currently has the option to count the number of days between dates and this includes weekends.

Having an option to exclude weekends would help to count the weekdays, instead of including weekends.

  • Attach files
      Drop here to upload
    • Admin
      Mike Lowery
      Reply
      |
      Feb 13, 2025

      I use this approach and wanted to share in case it is helpful to you too.

      Until the formula is changed you could try this approach. There are some limitations if you start or finish on a weekend you may be out by 1 day, for me it was close enough.

      datediff(field("Feature start date"),field("Feature end date"),"day")-(datediff(field("Feature start date"),field("Feature end date"),"week")* 2)

      I will break it down:

      Step 1 - Total days

      datediff(field("Feature start date"),field("Feature end date"),"day")

      Step 2 - Calculate the number of weeks

      datediff(field("Feature start date"),field("Feature end date"),"week")

      Step 3 - Calculate weekend days

      datediff(field("Feature start date"),field("Feature end date"),"week")*2

      If you put it all together you get this:

      working days = Total days - (total weeks x 2 days)

      If you look at the last example it starts on a Sunday and if you include that day then there should be 9 weekend days not 8 so it's out by 1 day. So it's not 100% perfect but it's pretty close.




    • Karla Johnson
      Reply
      |
      Feb 13, 2025

      Needed if you are running KPI's - a few days make a big difference.

    • Juliano Silva
      Reply
      |
      Jun 14, 2024

      It is so basic... How the heck disconsider weekends as a standard?

    • Guest
      Reply
      |
      Jan 12, 2024

      as others have said, excluding weekends will help build a more accurate picture of lead times/time to deliver on features etc. there is an existing, similar excel function (workday) that already does this.

    • Jason Gillmore
      Reply
      |
      Nov 1, 2023

      This was requested today by our idea intake manager who reports lead time metrics. We are using the datediff formula and would like to show the result in working days only.

    • Cory Kertz
      Reply
      |
      Sep 25, 2023

      datediff(field("Feature start date"),field("Feature due date"),"weekday")

      Ideally the UX would be something like this.

    • Swati S
      Reply
      |
      May 17, 2022

      Calculating only Network days gives an accurate representation of the Utilization %.


    • +2