hi,
the function below works out the days in a month, but how would i get it to not count weekends?
the function below works out the days in a month, but how would i get it to not count weekends?
Code:
function getDaysInMonth(strMonth,strYear)
dim strDays
Select Case cint(strMonth)
Case 1,3,5,7,8,10,12:
strDays = 31
Case 4,6,9,11:
strDays = 30
Case 2:
if ((cint(strYear) mod 4 = 0 and _
cint(strYear) mod 100 <> 0) _
or ( cint(strYear) mod 400 = 0) ) then
strDays = 29
else
strDays = 28
end if
End Select
getDaysInMonth = strDays
end function