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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top