Get the year from a date
=YEAR(date)
| Parameter | Description |
|---|---|
date |
A valid Excel date. |
The YEAR function returns the year of a date as a 4-digit number. YEAR takes just one argument, date, which must be a valid date. Date can be a cell c
=YEAR("23-Aug-2012") // returns 2012
The YEAR function requires just one argument, which must be a valid date or a value that Excel can convert into a valid date. With the date January 20
=YEAR(A1) // returns 2026
Note that you can use YEAR to extract the year from a date entered as text:
=YEAR("1/20/2026") // returns 2026
You can easily combine the YEAR function with other Excel functions. For example, to get the current year, you can use YEAR with the TODAY function li
=YEAR(TODAY()) // returns current year
Using the DATE function, you can extract a year from cell A1 and use it to create the date January 1 in the same year, like this:
=DATE(YEAR(A1),1,1) // first day of same year
Use the DATE function to extract just the year from a date. In the worksheet below, the formula in D5 is:
=YEAR(B5)