Forum Discussion

KuldipGandhi's avatar
KuldipGandhi
Qrew Member
12 years ago

How to calculate Total Working Hours (8 per day) for Whole month excluding Saturday-Sunday Weekend ?

How to calculate Total Working Hours (8 per day) for Whole month excluding Saturday-Sunday Weekend ?
What is the formula to be used?

  • You are really asking how to calculate the number of business days between two dates.  Fortunately, there is a function for that, and also functions to know the first day of the month and the last day if the month.

    You will need to which month you are talking about but if you wanted to know about the current month it would be

    This would be the formula for the current month

    8*
    WeekDaySub(LastDayOfMonth(Today()),FirstdayOfMonth(Today()))
  • How would this formula change for looking at future months? Let's say for example I wanted to calculate the business hours for February and then March in separate fields.
  • The next month would be

    8*
    WeekDaySub(LastDayOfMonth(AdjustMonth(Today(),1)),AdjustMonth(FirstdayOfMonth(Today()),1))

    and then put a 2 for 2 months ahead.
  • Awesome! And would this constantly adjust based on "Today" or would this remain static on February and March if we wanted to look back at historicals let's say if we are in October
  • That particular formula will float with "today".  You can so use negative numbers to look backwards.