123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home

Source Codes

Engineering Colleges

BE Students

Training  Reports (updated)

Seminar Reports (updated

Placement Papers (updated)

Forums

   Computer Science / IT

   Electronics

   Electrical

   Mechanical

   Chemical

   Civil

   CAT / MBA

   GMAT / Foreign MBA

Latest Jobs

Engineering Jobs / Technical Jobs

Management Jobs

Sitemap

About-Us

Terms of use

Displaying  Source Code(s)  
 

 
Number of Business Days

--------------------------------------------------------------------------------

Description : Counts the number of business days

add or subtract a number of business days from a date
'
' Note that it doesn't take Christmas, Easter and
' other holidays into account

Function BusinessDateAdd(ByVal days As Long, ByVal StartDate As Date, _
Optional ByVal SaturdayIsHoliday As Boolean = True) As Date
Do While days
' increment or decrement the date
StartDate = StartDate + Sgn(days)
' check that it is a week day
If Weekday(StartDate) <> vbSunday And (Weekday(StartDate) <> vbSaturday _
Or Not SaturdayIsHoliday) Then
' days becomes closer to zero
days = days - Sgn(days)
End If
Loop
BusinessDateAdd = StartDate
End Function

--------------------------------------------------------------------------------

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG