Gets number of days in a certain month
Function getDaysInMonth(strMonth, strYear)
Dim strDays
strDays = 31 ' Assuming month is 1,3,5,7,8,10,12
Select Case cint(strMonth)
Case 4,6,9,11 ' if not
strDays = 30
Case 2
strDays = 28
if ( (cint(strYear) mod 4 = 0 and cint(strYear) mod 100 < > 0) or ( cint(strYear) mod 400 = 0) ) Then strDays = 29
End Select
getDaysInMonth = strDays
End Function
Dim strDays
strDays = 31 ' Assuming month is 1,3,5,7,8,10,12
Select Case cint(strMonth)
Case 4,6,9,11 ' if not
strDays = 30
Case 2
strDays = 28
if ( (cint(strYear) mod 4 = 0 and cint(strYear) mod 100 < > 0) or ( cint(strYear) mod 400 = 0) ) Then strDays = 29
End Select
getDaysInMonth = strDays
End Function
strMonth, strYear
Views 4,808
Downloads 1,580
CodeID
DB ID
DevinGarlit
4
Revisions
v1.0
Sunday
July
15
2018