2FAwW‖

c2QjL‖Month Function

fCRok‖Returns the month of a year from a serial date that is generated by the DateSerial or the DateValue function.

Y8WeR‖Syntax:


gEYXb‖Month (Number)

SiGxe‖Return value:

psrUG‖Integer

CPZNo‖Parameters:

KdzLB‖Number: Numeric expression that contains the serial date number that is used to determine the month of the year.

SHhrH‖This function is the opposite of the DateSerial function. It returns the month in the year that corresponds to the serial date that is generated by DateSerial or DateValue. For example, the expression


Print Month(DateSerial(1994, 12, 20))

RcBtS‖returns the value 12.

SEjHR‖Error codes:

5 Invalid procedure call

F6tiW‖Example:


Sub ExampleMonth
AT5Wk‖    MsgBox "" & Month(Now) ,64,"The current month"
End Sub