DATE Function (OpenOffice Calc)
Learn the DATE function in Apache OpenOffice Calc: Provides an internal number for the date given.
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.
DATE constructs a spreadsheet date from separate year, month and day values. It returns a numeric date serial whose display depends on formatting and the document’s base date. It also normalizes ordinary out-of-range month/day components, so it is a constructor rather than a strict validator of the original components.
Syntax and arguments
=DATE(year; month; day)
All three arguments are required. In the pinned 4.1.16 callback, each numeric argument is approximately floored and converted to a signed 16-bit integer before date construction. The year is checked for negativity. Years below 100 use the formatter’s two-digit-year expansion setting; use explicit four-digit years instead of assuming a fixed century. Extreme values outside the internal argument representation are not certified. Examples use English function names and semicolon argument separators.
Reproducible examples
| Formula | Expected result |
|---|---|
=YEAR(DATE(2025;1;15)) |
2025 |
=DATE(2026;1;15) |
2026-01-15 |
=DATE(2026;13;1) |
2027-01-01 |
=DATE(2026;3;0) |
2026-02-28 |
=DATE(2024;3;0) |
2024-02-29 |
=DATE(2026;2;31) |
2026-03-03 |
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: construct dates from component columns
Use Year, Month and Day in A1:C1. Enter rows (2026;1;15), (2026;2;28) and (2024;2;29) in A2:C4. In D2 enter =DATE(A2;B2;C2) and fill down. Expected dates are January 15, 2026; February 28, 2026; and February 29, 2024. Apply a date format to D rather than treating its serial numbers as broken results.
In E2 enter =YEAR(D2)=A2, in F2 =MONTH(D2)=B2 and in G2 =DAY(D2)=C2. Fill down. All nine controls are TRUE for this valid dataset. These round-trip checks become useful when imports may contain invalid month/day combinations.
Advanced applications
Detect normalization. Add (2026;2;31) in A5:C5. DATE returns March 3, 2026, so the month and day round-trip controls are FALSE. The constructor has not certified February 31 as a valid date. Check integer inputs, their allowed range and the returned components when strict validation is required.
Find a month end. With 2026 in A2 and 2 in B2, =DATE(A2;B2+1;0) is February 28. Changing A2 to 2024 gives February 29. Day zero means the day preceding the normalized month’s first day. For December 2026, month+1 is 13 and the result is December 31, 2026.
Add calendar days. =DATE(2026;1;30)+5 gives February 4, 2026. This is a five-day interval, not five workdays. A weekend or holiday policy requires an additional function and an explicit calendar.
Errors, edge cases and troubleshooting
A date-looking text string is not the same as a constructed numeric date. DATE avoids ambiguous day/month order by using separate numeric components, but it does not remove the need to validate imported numbers. Two-digit years remain setting-dependent.
The non-strict helper normalizes months and offsets days from the first of that month. Values such as month 13 or day 0 therefore have useful documented source behavior. Do not interpret a successful normalized result as proof that the supplied components were originally valid. An invalid final Date follows the no-value error path, while a negative effective year follows the illegal-argument path; exact native error display was not tested.
Serial numbers depend on the workbook’s configured base date. Use DATE-produced values and compare calendar components when building portable examples; do not hard-code a serial copied from a different date system. The guide does not certify historical calendar boundaries, arbitrarily large components, locale parsing or all imported workbook conventions.
Date tip: Dates are internally numeric values, while date formatting controls their appearance. Compare actual dates, not text that merely resembles dates.
Related functions
Documentation and verification
See the Apache OpenOffice DATE 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.