fxExcelReps
PRO

You've used your 3 free functions

To practise YEAR, MONTH, DAY and every other function, get a PRO subscription.

  • Unlimited access to every function
  • New functions and exercises every month
  • Every mistake explained + full solutions

Your free functions — you can always come back to these:

← All functions

How to use YEAR, MONTH, DAY in Excel

YEAR, MONTH and DAY extract one part of a date as a number. Use them to group sales by year or month, build reports per period or create new dates.

Syntax

=YEAR(date) · MONTH(date) · DAY(date)

serial_numberA date (cell or formula) — the same argument for all three functions.

Examples

=YEAR(A2)2025 from 15-Mar-2025.
=MONTH(A2)3 from 15-Mar-2025.
=DAY(A2)15 from 15-Mar-2025.
=SUMPRODUCT((YEAR(A2:A100)=2025)*C2:C100)Total sales in 2025.

Common mistakes

#VALUE! error
The "date" is actually text. Convert it with DATEVALUE or rebuild it with DATE.
Month as a name
MONTH returns 3, not "March". Use TEXT(A2, "mmmm") for the name.

Available in: All versions of Excel, Excel for the web, Google Sheets

Related functions

DATETODAYEOMONTHSUMPRODUCT