- Home
·
- Miscellaneous
·
- Function takes a date and adds a variable number of business days to the date. So if you pass in to
Function takes a date and adds a variable number of business days to the date. So if you pass in to
Function takes a date and adds a variable number of business days to the date. So if you pass in today and 5, it returns the date that is five
Rate Function takes a date and adds a variable number of business days to the date. So if you pass in to
(1(1 Vote))
' SUBROUTINE : AddBusinessDays
' DESCRIPTION : Adds a number of business days to a date and returns the result
' INPUTS : byval adtDate as Date - Initial date
' : byval alDays as long - Number of days to add
' OUTPUTS : RetVal - New date
' REVISIONS : 1.0.0 CB 04/01/2001 Original version.
Public Function AddBusinessDays(ByVal adtDate As Date, ByVal alDays As Long) As Date
Dim ldtNewdate As Date
Dim llLoop As Long
llLoop = alDays
ldtNewdate = adtDate
Do Until llLoop <= 0
ldtNewdate = ldtNewdate + 1
Select Case Format(ldtNewdate, "w")
Case 2, 3, 4, 5, 6
llLoop = llLoop - 1
End Select
Loop
AddBusinessDays = ldtNewdate
End Function
Function takes a date and adds a variable number of business days to the date. So if you pass in to Comments
No comments yet — be the first to post one!
Post a Comment