Excel functions / Dates
YEAR, MONTH & DAY
Return the year, month or day number from a date.
Syntax
=YEAR(date)
=MONTH(date)
=DAY(date)Arguments
date | A cell containing a date. |
|---|
How it works
These pull one part out of a date. YEAR gives a four-digit year, MONTH a number from 1 to 12, and DAY a number from 1 to 31.
They are useful for grouping, for example adding a Year column so you can total sales by year. DATE puts the parts back together: =DATE(2026,12,25).
Example
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Task | Start | End | ||
| 2 | Design | 2026-01-01 | 2026-01-15 | 2 | |
| 3 | Build | 2026-01-15 | 2026-02-14 | ||
| 4 |
Result: 2. The Build task ends in month 3, March.
Tips
- Excel stores each date as a number of days since 1900, which is why date maths works.
Practise YEAR, MONTH & DAY
Try it yourself in a real spreadsheet, with instant feedback on every answer.