The YEAR function is a simple date function that extracts just the year from a time value. If you are working with times, but only care about the years, the YEAR function lets you get rid of everything else. Remember that dates are really just saved as numbers by your spreadsheet with date formatting applied.
The YEAR function returns the value of the year from any given unit of time.
Example 1 – Plain and Simple
A few simple examples of the YEAR function.
||Extract the year value from 1/2016.||2016|
||Extract the year value from 1/31/2016.||2016|
||Extract the year value from 2016||1905|
Tip: Notice that the YEAR function can’t figure out that the number 2016, when typed alone in a cell, refers to a year. See how dates and times work to make a little sense out of this.
Live examples in Sheets
Go to this spreadsheet for the examples of the YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND functions shown above that you can study and use anywhere you would like.