YEAR()

Syntax. YEAR(serial_number)

Definition. This function extracts the four-digit year from a date. The YEAR() function returns an integer between 1900 and 9999.

Arguments

  • serial_number (required). The date from which you want to extract the year.

Background. With this function, as well as with the MONTH() and DAY()functions, you can extract components for use in other calculations.

Take care not to enter the dates as text. The values returned by the functions YEAR(), MONTH(), and DAY() correspond to the Gregorian calendar.

See Also

For more information about saving dates in Excel, see the section titled The Excel Date System in Chapter 2.

Example. You might want to use the Excel AutoFilter to sort a set of data by year and need to calculate the year ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.