Breaking Apart Dates With YEAR, MONTH, DAY
Extract individual components from a date value.
Why Split a Date?
A date like 2026-06-18 packs three facts into one cell: a year, a month, and a day. Often you need just one piece. Maybe you want to group sales by month, or filter records to a single year.
Three small functions pull each part out as a plain number: YEAR, MONTH, and DAY. Each takes a single date and returns its corresponding component.
In this lesson you will learn all three and how to use them together.
The YEAR Function
The YEAR function takes a date and returns its four-digit year as a number. If cell A2 holds 2026-06-18, then =YEAR(A2) returns 2026.
The result is a regular number, not a date, so you can compare it, sum it, or use it inside other formulas. For instance, you can test whether a record belongs to a target year.
=YEAR(A2)All lessons in this course
- Today and Now for Live Dates
- Breaking Apart Dates With YEAR, MONTH, DAY
- Building Dates With DATE and EDATE
- Counting Days Between Dates