ExcelUnpackUnpack Excel, one formula at a time.
Log inSign up

Lesson 58 · Dates

YEAR, MONTH and DAY in Excel

YEAR, MONTH and DAY pull one part out of a date. =MONTH(A2) gives 3 for any date in March. They are handy for grouping and sorting by month or year.

Practice this lesson →Pro lesson. The first 4 lessons are free.

What you will learn

  • Get the year, month and day from a date

How it works

=YEAR(A2), =MONTH(A2) and =DAY(A2) pull out each part.

Formulas at a glance

=YEAR(A2)The pattern to follow
=MONTH(A2)The pattern to follow
=DAY(A2)The pattern to follow

Example

Write the formula to get the year from the first birthday.

ABCDEFG
1BirthdayYearMonthDayDue dateDue month
24/12/20149/15/2026
311/3/201310/2/2026
47/28/201412/18/2026
51/9/20152/27/2027

Click B2 and type =YEAR(A2), then press Enter.

The answer is 2014.

When to use it

  • Grouping sales by month
  • Finding birthdays in a month
  • Splitting a date into columns

Common mistakes

  • Using them on text that looks like a dateThe cell must be a real date. Check that it lines up on the right.
  • Expecting a month nameMONTH gives a number. Use TEXT(A2,"mmmm") for the name.
  • Forgetting the parenthesesWrite =YEAR(A2).

Practice it on a real sheet

Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.

YEAR, MONTH and DAY in Excel: how it works, with examples · ExcelUnpack