# DATE formula generator

> Describe what you need and get a DATE formula for Excel and Google Sheets, run on real data before you copy it. Plus 8 tested DATE examples.

Source: https://spreadsheetpractice.com/tools/formula-generator/date · Updated October 29, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

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

Describe the task at [DATE formula generator](https://spreadsheetpractice.com/tools/formula-generator/date) and get a DATE formula for Excel and Google Sheets, tested on real data.

## Tested DATE examples

### Add days to a date

`=B2+C2`

Excel. Result on the sample sheet: 5 rows (D2:D6). [See it and try it](https://spreadsheetpractice.com/formulas/add-days-to-a-date)

### Add weeks to a date

`=B2+C2*7`

Excel. Result on the sample sheet: 5 rows (D2:D6). [See it and try it](https://spreadsheetpractice.com/formulas/add-weeks-to-a-date)

### Create a date from separate year, month and day columns

`=DATE(A2,B2,C2)`

Excel. Result on the sample sheet: 5 rows (D2:D6). [See it and try it](https://spreadsheetpractice.com/formulas/create-a-date-from-year-month-and-day)

### Count dates in a given year

`=COUNTIFS(B2:B11,">="&DATE(G1,1,1),B2:B11,"<"&DATE(G1+1,1,1))`

Excel. Result on the sample sheet: 5. [See it and try it](https://spreadsheetpractice.com/formulas/count-dates-in-a-year)

### Count dates in a fiscal year

`=COUNTIFS(B2:B12,">="&DATE(G1-1,G2,1),B2:B12,"<"&DATE(G1,G2,1))`

Excel. Result on the sample sheet: 7. [See it and try it](https://spreadsheetpractice.com/formulas/count-dates-in-a-fiscal-year)

### Count dates by quarter

`=COUNTIFS(B2:B13,">="&DATE(G1,G2*3-2,1),B2:B13,"<"&DATE(G1,G2*3+1,1))`

Excel. Result on the sample sheet: 4. [See it and try it](https://spreadsheetpractice.com/formulas/count-dates-by-quarter)

### Calculate a year-to-date (YTD) total

`=SUMIFS(C2:C10,A2:A10,">="&DATE(YEAR(F1),1,1),A2:A10,"<="&F1)`

Excel. Result on the sample sheet: $15,580. [See it and try it](https://spreadsheetpractice.com/formulas/year-to-date-total)

### Sum by year

`=SUMIFS($C$2:$C$10,$A$2:$A$10,">="&DATE(E2,1,1),$A$2:$A$10,"<="&DATE(E2,12,31))`

Excel. Result on the sample sheet: 3 rows (F2:F4). [See it and try it](https://spreadsheetpractice.com/formulas/sum-by-year)

## Questions

### What does the DATE formula generator do?

You describe the task in plain English, and it writes the formula, using DATE where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.

### What does DATE do?

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

### Can I learn to write DATE formulas myself?

Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the DATE function page has a practice exercise.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
