Month

Description

Gets the month of a date value.

Syntax

Month ( date )

Argument

Description

date

The date from which you want the month


Return value

Integer. Returns an integer (1 to 12) whose value is the month portion of date.

Examples

This expression returns 1:

Month(2005-01-31)

This expression for a computed column returns Wrong Month if the month in the column expected_grad_date is not 6:

If(Month(expected_grad_date) = 6, "June", "Wrong Month")

This validation rule expression checks that the value of the month in the date in the column expected_grad_date is 6:

Month(expected_grad_date) = 6

See also

Day

Date

Year

Month in the section called “Month” in PowerScript Reference