Subtract Workdays

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the dhAddWorkDaysA function and it is working great. However for
the first time i have to subtract a number of workdays from a predefined date
and need some help.
Any thoughts would be appreciated.
 
Leveraging the already written function of dhPreviousWorkdayA(), and that it
has to offer

Function scSubtractWorkDaysA(pintDays As Integer, pdtmDate As Date) As Date

'Written by Steve Clark
Dim dtmDate As Date
Dim i As Integer

dtmDate = pdtmDate

For i = 1 To pintDays
dtmDate = dhPreviousWorkdayA(dtmDate)
Next i

SubtractBizDaysA = dtmDate

End Function
 
Back
Top