Month

Purpose

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

Syntax

Month(date)

Description

The date argument is any expression that can represent a date. If date contains Null, then Null is returned.

Example

This example uses the Month function to return the current month:

Dim MyVar MyVar = Month(Now) ' 

MyVar contains the number corresponding to the current month.

Function Result
Month("01-01-2016") 1
Month("01 Feb 2016") 2
Month("01 March 16") 3

Where MonthName can be 1...12.