Forum Discussion

SyaefulBahri3's avatar
SyaefulBahri3
Qrew Trainee
6 years ago

Date Duration Exclude Weekend

Hi All,

I have a field like this

Employee Name | Leave Type | Start Date | End Date | Duration

I set Duration field as Formula Duration with this formula to count employee leave duration

[End Date] - [Start Date]

It appears if there is for example employee taking leave from Friday to Monday. It will count also weekend as duration

How to exclude weekend from duration calculation?

Many thanks




------------------------------
Syaeful Bahri
------------------------------
  • WeekDaySub([start date],[end date])

    You might need to change it to a formula date field and then change your start date and end date to dates in the formula as well. So if that doesn;t work then try this with my previous advice.

    WeekDaySub(ToDate([start date]),ToDate([end date]))
  • AustinK's avatar
    AustinK
    Qrew Commander
    WeekDaySub([start date],[end date])

    You might need to change it to a formula date field and then change your start date and end date to dates in the formula as well. So if that doesn;t work then try this with my previous advice.

    WeekDaySub(ToDate([start date]),ToDate([end date]))