Contact

MONTH Function (OpenOffice Calc)

Date & Time Intermediate OpenOffice Calc

Learn the MONTH function in Apache OpenOffice Calc: Determines the sequential number of a month of the year (1-12) for the date value.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Availability and version history

  • Introduced: Documented by Apache OpenOffice 4.1.16; original introduction not established.
  • Availability: Supported in Apache OpenOffice 4.1.16, verified against its function registry. This identifies a supported release, not a final working version.
  • Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
  • Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.

MONTH returns a date’s month number, from 1 for January through 12 for December in the ordinary calendar examples. It does not return a month name or the number of elapsed months. The pinned callback approximately floors the numeric serial, adds it to the workbook’s base date and reads the month component.

Syntax and arguments

=MONTH(date_value)

Supply one numeric date/date-time or a reference to one. A fractional day does not change the month for the ordinary modern dates used here. The workbook’s date base determines the calendar meaning of raw serials; DATE-built values make the examples independent of a guessed serial constant. Examples use English function names and semicolon argument separators.

Reproducible examples

Formula Expected result
=MONTH(DATE(2025;1;15)) 1
=MONTH(DATE(2026;12;31)) 12
=MONTH(DATE(2024;2;29)) 2
=MONTH(DATE(2026;13;1)) 1
=MONTH(DATE(2026;1;31)+1) 2
=MONTH(DATE(2026;6;30)+TIME(23;0;0)) 6

The first formula preserves the original example and result. Its historical comparable LibreOffice 25.2 check was not an OpenOffice test. New calendar and time results are independently checked reference expectations, not captured native cells. Calendar dates use ISO notation and clock results use HH:MM:SS to avoid ambiguous display conventions.

Practical worksheet: create month and quarter fields

Enter =DATE(2026;1;15), =DATE(2026;4;2), =DATE(2026;7;20) and =DATE(2026;12;31) in A2:A5. In B2 enter =MONTH(A2) and fill down. Results are 1, 4, 7 and 12. In C2 enter =INT((B2-1)/3)+1 and fill down, producing calendar quarters 1, 2, 3 and 4.

The subtraction of 1 puts January in the first zero-based group before integer division. Check quarter boundaries explicitly: March is quarter 1 and April quarter 2. A fiscal quarter can use different boundaries and needs its own definition.

Advanced applications

Avoid merging different years. January 2025 and January 2026 both yield 1. A useful year-month key is =YEAR(A2)*100+MONTH(A2), giving 202501 and 202601 respectively. This numeric label is not itself a date serial. For a true monthly date anchor, use =DATE(YEAR(A2);MONTH(A2);1).

Construct the next month’s start. =DATE(YEAR(A2);MONTH(A2)+1;1) moves a December 2026 date to January 1, 2027 by DATE’s month normalization. Do not simply add 30 days to infer next month’s start; months differ in length.

Count days in the current month. =DAY(DATE(YEAR(A2);MONTH(A2)+1;0)) gives 28 for February 2026, 29 for February 2024 and 31 for December 2026. MONTH identifies the period, while DATE and DAY perform the boundary calculation.

Errors, edge cases and troubleshooting

Subtracting month numbers is not an elapsed-month calculation across years. MONTH(January)-MONTH(December) gives -11 even when the dates are a month apart chronologically. Preserve full dates and define whether the task concerns calendar boundaries, completed months or a duration.

A cell formatted to display only a month name still contains its original numeric date when entered correctly. MONTH reads that date rather than its visible text. Conversely, the text January is not automatically a valid numeric date. The guide does not promise a particular parsing result for every locale or text input.

Use a numeric output format for a month number. Applying a date format to the returned integer can display an unrelated base-date-derived date and make a correct result look wrong. Blank input handling, historical serial limits and import conversions are not newly tested. Keep the year when grouping multi-year records, and state whether the intended reporting month is calendar-based or follows another business rule.

Date tip: Dates are internally numeric values, while date formatting controls their appearance. Compare actual dates, not text that merely resembles dates.

Documentation and verification

See the Apache OpenOffice MONTH reference, 4.1.16 function resources and versioned date/time interpreter. Official source snapshots were retrieved October 13, 2026 and re-read for this guide. The calculations use an independent calendar and exact rational day-fraction model; no fresh native/headless application or GUI execution is claimed. First introduction and final functioning version remain unknown, separate from documented 4.1.16 support.