Formualizer Docs

DATE

Returns the serial number for a calendar date from year, month, and day.

DATE normalizes out-of-range month and day values to produce a valid calendar date.

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

=DATE(year, month, day)

Arguments

ArgumentTypeRequiredDefault
yearnumberRequired—
monthnumberRequired—
daynumberRequired—

Remarks

  • Years in the range 0..=1899 are interpreted as 1900..=3799 for Excel compatibility.
  • The returned serial is date-system aware and depends on the active workbook system (1900 vs 1904).
  • In the 1900 system, serial mapping preserves Excel's historical phantom 1900-02-29 behavior.

Examples

Construct a leap-day date from separate year, month and day numbers.

Formula =DATE(2024,2,29)

Expected result 45351

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?.

Normalize month 13 to January of the following year.

Formula =DATE(2024,13,1)

Expected result 45658

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?.

Use day zero to find the final day of the preceding month.

Formula =DATE(2024,3,0)

Expected result 45351

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?.

The year argument must resolve to a number.

Formula =DATE("year",2,29)

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?.

Build a standard date

Formula =DATE(2024, 1, 15)

Expected result 45306

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?.

Normalize overflowing month input

Formula =DATE(2024, 13, 5)

Expected result 45662

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

Does DATE follow the workbook 1900/1904 date system?

Yes. DATE emits a serial in the active workbook date system, so the same calendar date can map to different serials across 1900 vs 1904 mode.

Implementation

Engine source

On this page