# MONTH()

Month of year from Date, DateTime, or Time

Returns the month of the year (`1` to `12`) if identifiable, a fixed default month if a `Time` value is provided, or `0` if a month is not found.

## Sample usage

`MONTH(TODAY())` : This month. See also: `TODAY()`

`MONTH([Birthday])` : Someone's birth month.

#### Month name

Convert today's month number to the month name:

``````INDEX(
LIST(
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
),
MONTH(TODAY())
)``````
1. `LIST("Jan", "Feb", "Mar", ...)` enumerates the 12 month names,
2. `MONTH(TODAY())` gets the month number (1 to 12) for today.
3. `INDEX(..., ...)` gets the month name from `LIST(...)` corresponding to the month number returned by `MONTH(...)`.

See also: `INDEX()`, `LIST()`, `TODAY()`

#### Last month

``(MOD((MONTH(TODAY()) - 1 + 12 - 1), 12) + 1)``
1. `MONTH(TODAY())` gets today's month number in the range 1...12.
2. `... - 1` converts month number from (1) to the range 0...11.
3. `... + 12` converts month number from (2) to the range 12...23.
4. `... - 1` steps month number from (3) back one ("last month"), giving a month number in the range 11...22. Use `... + 1` instead to step ahead one month ("next month") instead, giving a range of 13...24.
5. `MOD(..., 12)` converts the adjusted month number from (4) to the range 0...11.
6. `(... + 1)` converts the adjusted month from (5) to 1...12.

Equivalent to `MONTH(EOMONTH(TODAY(), - 1))`.

See also: `EOMONTH()`, `MOD()`, `TODAY()`

## Syntax

`MONTH(when)`

• `when` - A `Date`, `DateTime`, or `Time` value.

`DAY()`
`YEAR()`