Excel functions / Dates

YEAR, MONTH & DAY

Return the year, month or day number from a date.

Syntax=YEAR(date) =MONTH(date) =DAY(date)

Arguments

dateA 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

E2=MONTH(C3)
ABCDE
1TaskStartEnd
2Design2026-01-012026-01-152
3Build2026-01-152026-02-14
4

Result: 2. The Build task ends in month 3, March.

Tips

Practise YEAR, MONTH & DAY

Try it yourself in a real spreadsheet, with instant feedback on every answer.

Start the exercise

Related