/ Published in: ASP
URL: http://reusablecode.blogspot.com/2010/09/number-of-working-days-in-month.html
Returns the number of working days in a month. Does not take holidays into consideration. I needed this function for the purposes of calculating employee annual salary, and holidays are paid days anyway. Requires my MonthDays and isLeapYear functions.
Expand |
Embed | Plain Text
Function WorkingDays(someYear, someMonth) WorkingDays = 0 For i = 1 To MonthDays(someYear, someMonth) If Weekday(DateSerial(someYear, someMonth, i)) <> 1 And Weekday(DateSerial(someYear, someMonth, i)) <> 7 Then WorkingDays = WorkingDays + 1 End If Next End Function
You need to login to post a comment.
