- Home
·
- Miscellaneous
·
- Function that counts the difference between two dates excluding one day in a week (for example sund
Function that counts the difference between two dates excluding one day in a week (for example sund
Function that counts the difference between two dates excluding one day in a week (for example sunday - non-working day)
Rate Function that counts the difference between two dates excluding one day in a week (for example sund
(2(2 Vote))
Dim tmpDate As Date
DateDifference = 0
S = 0
tmpDate = vbFirstDate
Do
Select Case DateTime.Weekday(tmpDate)
Case vbExcludeDay 'Skip excluded day
Case Else
DateDifference = DateDifference + 1 'If not excluded day inc
End Select 'by one
tmpDate = tmpDate - 1
Loop Until tmpDate = vbSecondDate
End Function
Function that counts the difference between two dates excluding one day in a week (for example sund Comments
No comments yet — be the first to post one!
Post a Comment