- Home
·
- Miscellaneous
·
- Get information on a month by feeding the function its month number. Returns either month length, l
Get information on a month by feeding the function its month number. Returns either month length, l
Get information on a month by feeding the function its month number. Returns either month length, long month name, or short month name.
API Declarations
smpLongMonth = 0
smpShortMonth = 1
smpLength = 2
End Enum
Rate Get information on a month by feeding the function its month number. Returns either month length, l
(1(1 Vote))
Dim dDate As Date
dDate = iMonth & "/1/" & Year(Date)
Select Case tMonthPart
Case Is = 0 ' Long
GetMonthInfo = Format(dDate, "MMMM")
Case Is = 1 ' Short
GetMonthInfo = UCase(Left(Format(dDate, "MMMM"), 3))
Case Is = 2 ' Length
GetMonthInfo = DateSerial(Year(dDate), Month(dDate) + 1, Day(dDate)) - DateSerial(Year(dDate), Month(dDate), Day(dDate))
End Select
End Function
Get information on a month by feeding the function its month number. Returns either month length, l Comments
No comments yet — be the first to post one!
Post a Comment