Module
Contents
Index 🔎︎
\<bookmark_value\>Month function\</bookmark_value\>

# Month Function

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

## Syntax:

    Month (Number)

## Return value:

Integer

## Parameters:

\<emph\>Number:\</emph\> Numeric expression that contains the serial date number that is used to determine the month of the year.

This function is the opposite of the \<emph\>DateSerial \</emph\>function. It returns the month in the year that corresponds to the serial date that is generated by \<emph\>DateSerial\</emph\> or \<emph\>DateValue\</emph\>. For example, the expression

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

returns the value 12.

## Error codes:

5 Invalid procedure call

## Example:

    Sub ExampleMonth

        MsgBox "" & Month(Now) ,64,"The current month"

    End Sub