Month Function

Description

Returns a whole number between 1 and 12, inclusive, representing the month of the year.

Syntax

Month(date)

The date named argument is limited to a date or numbers and strings, in any combination, that can represent a date. If date contains no valid data, Null is returned.

See Also

Date Function, Date Statement, Day Function, Now Function, Weekday Function, Year Function.

Example

This example uses the Month function to obtain the month from a specified date.


' In the development environment, the date literal will display in short 
' format using the locale settings of your code.
MyDate = #February 12, 1969#    ' Assign a date.
MyMonth = Month(MyDate)    ' MyMonth contains 2.