Month()

Syntax

Month(SerialNumber)

Remarks

Returns an integer between 1 and 12, inclusive, corresponding to the month component of SerialNumber, a decimal representation of the date, time, or both. For information about serial numbers, see DateSerial().

Example

This example displays the number of full months between the current month and the new year:


months = Month(Now())
MsgBox Str$(12 - months) + " full month(s) left in the year."

See Also

DateSerial(), Day(), Hour(), Minute(), Now(), Second(), Today(), Weekday(), Year()