Formualizer Docs

MONTH

Extracts the month number (1 to 12) from a date serial.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=MONTH(serial_number)

Arguments

ArgumentTypeRequiredDefault
serial_numbernumberRequired—

Remarks

  • A date argument may be text holding a date or time ("10/26/1999", "1999-10-26 14:05"), read as its serial; text that is neither a number nor a date returns #VALUE!.
  • Fractional time is ignored; only the date portion contributes.
  • Serials are interpreted with the workbook's date system (Excel 1900 or Excel 1904).
  • The result always uses January=1 through December=12.

Examples

Extract the date component from a leap-day date.

Formula =MONTH(DATE(2024,2,29))

Expected result 2

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Read the date component from a serial that also contains a time fraction.

Formula =MONTH(DATE(2024,12,31)+0.75)

Expected result 12

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Read the component of the first day of the 1900 date system.

Formula =MONTH(1)

Expected result 1

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

An unrecognized date string cannot be interpreted as a serial.

Formula =MONTH("not a date")

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Extract month from January date

Formula =MONTH(44927)

Expected result 1

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Extract month from leap-day serial

Formula =MONTH(45351)

Expected result 2

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

Can MONTH return values outside 1 through 12?

No. MONTH always returns an integer from 1 to 12 after serial-to-date conversion.

Implementation

Engine source

On this page