Month
Returns a whole number between 1 and 12, inclusive, representing the month of the year.
Syntax
Month(Val)
Parameters
Val
Type: Date
The date for which you want to return the month.
(return)
Type: Long
The month of the year (1 to 12).
Remarks
This is equivalent to DatePart("m", Val).
Example
This example uses the Month function to return the month from the current date (which is in turn returned by the
Now function). For example, on 20 May 2002, this example would return 5.
Month(Now())
For an example of using the MonthName function with Month and Now to return the name of the current month, see
MonthName.
See also