MS Access: Month Function
In Microsoft Access, the Month function returns the month (a number from 1 to 12) given a date value.
Syntax
The syntax for the Month function is:
Month ( date_value )
date_value is a valid date.
Applies To
- Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000
For Example
| Month (#22/11/2003#) | would return 11 |
| Month (#01/01/1998#) | would return 1 |
VBA Code
The Month function can be used in VBA code. For example:
Dim LMonth As Integer LMonth = Month(#12/03/2001#)
In this example, the variable called LMonth would now contain the value of 3.
SQL/Queries
You can also use the Month function in a query.
