This function returns the number of weekdays between two dates, inclusive of the end date.
Parameter: Date
Start
Type: date
Description: This is the starting date.
Parameter: Date
End
Type: date
Description: This is the ending date.
Return value: Weekdays
Type: integer
Description: This is the number of weekdays between the two dates including
the ending date if it is a weekday.
Sub Main(parm as object)
Dim
dtStart as Date = DateTime.Parse("8/1/2006")
Dim
dtEnd as Date = DateTime.Parse("8/10/2006")
Dim
iResult as Integer
iResult
= hs.Weekdays(dtStart, dtEnd)
hs.WriteLog("Weekdays","There
are " & iResult.ToString & " weekdays between the dates.")
End Sub
The above example returns this result:
Weekdays - There are 7 weekdays between the dates.