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.

Note

Some constant values, such as "MM/DD/YYYY", are evaluated as a Date value by AppSheet. Similarly, "000:00:00" is evaluated as a Duration value. This doesn't mean your spreadsheet data must use the same formats: the date and time formats in your spreadsheets are determined by the locale/language setting. Column will always be evaluated as the type of column. Additionally, you can convert data, both columns and string literals, to specific types using functions such as DATE(), TIME(), or DATETIME()

See also

Date and time expressions

DAY()

YEAR()

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

true
Search
Clear search
Close search
Google apps
Main menu