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
- Excel 2016
- Excel 2019
- Excel 2021
- Excel 2024
- Microsoft 365
- Google Sheets
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.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Invoice | Year | Month | Day | Amount | Date |
| 2 | INV-301 | 2026 | 1 | 28 | $1,250.00 | 28 Jan 2026 |
| 3 | INV-302 | 2026 | 2 | 3 | $480.00 | |
| 4 | INV-303 | 2026 | 2 | 17 | $2,200.00 | |
| 5 | INV-304 | 2026 | 3 | 9 | $975.00 | |
| 6 | INV-305 | 2026 | 3 | 31 | $640.00 | |
| 7 | INV-306 | 2026 | 4 | 14 | $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. DATE: Builds the date with year
B2, monthC2and dayD2.year=`B2`: a four-digit yearmonth=`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
| Argument | Required | What it is |
|---|---|---|
| year | Yes | The 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. |
| month | Yes | The month, 1 to 12. Bigger numbers roll into the next year and 0 or negative numbers roll back into the year before. |
| day | Yes | The 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
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?
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.