Going Stellar

Home/Google Sheets reference

Google Sheets function · Date

DATE in Google Sheets: syntax and examples

DATE turns three numbers into a real date value. Months above 12 and days above the month length roll into the next period, and a day of 0 gives the last day of the previous month. Use it to build dates from separate columns or to do month arithmetic.

Syntax

DATE(year, month, day)

Arguments

ArgumentTypeRequiredWhat it does
yearnumberyesThe year. Use four digits: 0 to 1899 are added to 1900.
monthnumberyesThe month. Values above 12 roll into the next year, 0 or less go back.
daynumberyesThe day. Values above the month length roll into the next month, 0 is the last day of the previous month.

Examples

The examples use this table, starting in A1:

YearMonthDayLabel
2026315Launch
20261231Year end
2026230Overflow
2024229Leap
=DATE(A2, B2, C2)

Result: 3/15/2026

A date built from three cells. The display follows the locale format.

Run in a Google Sheet (English US locale) on .

=DAYS(DATE(2026, 14, 1), DATE(2026, 1, 1))

Result: 396

Month 14 rolls into February of the next year. DAYS counts the gap in days.

Run in a Google Sheet (English US locale) on .

=DAY(DATE(A4, B4, C4))

Result: 2

February 30 does not exist, so the result is March 2.

Run in a Google Sheet (English US locale) on .

=DAY(DATE(2026, 3, 0))

Result: 28

Day 0 of March is the last day of February.

Run in a Google Sheet (English US locale) on .

=DAYS(DATE(A5, 3, 1), DATE(A5, 2, 1))

Result: 29

Length of February in the year of A5. 2024 is a leap year.

Run in a Google Sheet (English US locale) on .

=TEXT(DATE(A2, B2, C2), "yyyy-mm-dd")

Result: 2026-03-15

The same date as text in a fixed format, identical in every locale.

Run in a Google Sheet (English US locale) on .

Common errors

  • Text that is not a number, such as "abc" in the year, returns #VALUE!.
  • A year of 10000 or more returns #NUM!.
  • Years from 0 to 1899 are added to 1900. DATE(99, 1, 1) is in 1999, so write four-digit years.
  • The cell shows the date in the format of the spreadsheet locale, for example 3/15/2026 in en_US and 15.03.2026 in ro_RO. The stored value is the same number.

Compared with Excel

Same syntax in Excel. The rollover of months and days works the same way.

Questions and answers

How do I get the last day of a month with DATE?

Ask for day 0 of the next month. DAY(DATE(2026, 3, 0)) gives 28, the last day of February 2026.

Sources

  1. DATE (Docs Editors Help)

Markdown version · All functions