HomePrivacy PolicyFeedbackLink to usSite Map

MS Access: Month Function


In Access, the Month function returns the month (a number from 1 to 12) given a date value.

The syntax for the Month function is:

Month ( date_value )

date_value is a valid date.


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.