formulastreak

Dates function

DATE function in Google Sheets and Excel

DATE builds a real date from three numbers: a year, a month and a day.

Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet

Syntax

DATE(year, month, day)

Arguments in [brackets] are optional. Google Sheets writes it DATE(year, month, day).

Example

=DATE(B2,C2,D2) reads: Take the year from B2, the month from C2 and the day from D2, and put them together as one date.

Freelance invoices · edit F2 and watch it recalculate
Click a cell (or use the arrow keys) to insert its address · Enter shows the resultF2 = 28 Jan 2026
ABCDEF
1InvoiceYearMonthDayAmountDate
2INV-3012026128$1,250.0028 Jan 2026
3INV-302202623$480.00
4INV-3032026217$2,200.00
5INV-304202639$975.00
6INV-3052026331$640.00
7INV-3062026414$1,830.00

F2 shows 28 Jan 2026: year 2026, month 1, day 28 from INV-301's columns.

How the spreadsheet calculates it

Builds the date with year B2, month C2 and day D2.

  1. 1. DATE: Builds the date with year B2, month C2 and day D2.
    • year = `B2`: a four-digit year
    • month = `C2`: 1 to 12 (bigger numbers roll into the next year)
    • day = `D2`: the day of the month

More DATE examples

  • =DATE(2026,1,1)1 January 2026 as a real date.
  • =DATE(YEAR(A2),MONTH(A2),1)The first day of the month that the date in A2 falls in.
  • =DATE(YEAR(A2),MONTH(A2)+1,0)The last day of A2's month: day 0 of the next month.
  • =SUMIFS(E2:E7,F2:F7,">="&DATE(2026,2,1),F2:F7,"<"&DATE(2026,3,1))The total of February's amounts, with the month's limits built by DATE.

Paste any of these into the formula explainer to see it step by step.

Tips

  • Write years with four digits so there's never any doubt about the century.
  • Use DATE for date criteria instead of typed text: ">="&DATE(2026,1,1) works the same in every locale, while "1/2/2026" means different days in different countries.
  • Let the roll-over work for you: month 13 is January of the next year, and day 0 is the last day of the month before.

What DATE is used for

Rebuilding dates that an export split into separate year, month and day columns, making the first or last day of a month for reports and date criteria in SUMIFS, and building schedules where the month or year comes from a calculation.

Arguments

ArgumentRequiredWhat it is
yearYesThe year, best written with four digits like 2026 or a cell holding it.Watch out: A two-digit year such as 26 is read as 1926: a year from 0 to 1899 is added to 1900.
monthYesThe month, 1 to 12. Bigger numbers roll into the next year and 0 or negative numbers roll back into the year before.
dayYesThe day of the month. A day past the month's end rolls into the next month; 0 means the last day of the month before.

Common mistakes

  • Putting the arguments in day-month-year order: it's always year, month, day.

  • Typing a date as text inside the formula, like DATE("28/01/2026"): DATE wants three separate numbers.

  • Seeing a number like 46050 instead of a date: the result is right, the cell just needs a date format.

  • Using a two-digit year: DATE(26,1,28) is a date in 1926, not 2026.

In Google Sheets

Google Sheets has DATE with the same three arguments in the same order (year, month, day), so formulas built with it move between the two apps unchanged. Both apps store a date as a number underneath, so the cell's format decides whether you see a date or that number.

Errors you may see with DATE

  • #VALUE!: One of the arguments is text that isn't a number, such as "Jan" in the month column.
  • #NUM!: The date would fall outside the range the app can store, for example a negative year.
  • #####: The column is too narrow for the date format; widen it.

Questions

Why does DATE show a number instead of a date?

Dates are stored as numbers counted from a starting day, and a cell formatted as General shows that number. Give the cell a date format (Short Date, or d mmm yyyy) and the same value shows as a date.

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

Use day 0: DATE(2026,3,0) is 28 Feb 2026, the day before 1 March. For the end of any month counted from a date, EOMONTH is easier to read.

Can DATE turn text like 2026-01-28 into a date?

Not directly; DATE takes numbers. Cut the parts out with LEFT, MID and RIGHT and give them to DATE, or use DATEVALUE on text the app recognises as a date.

How do I add a year to a date?

Rebuild it with the year increased: DATE(YEAR(A2)+1,MONTH(A2),DAY(A2)). Or move it by 12 months with EDATE(A2,12).

Sources

Official documentation the facts on this page were checked against.

Practise DATE on a live sheet

Lesson 26, Dates (Unit 6, Text and dates), has 6 graded exercises, checked instantly, with steps and hints when you're stuck. Pro