YEAR() returns the year portion of a specified DateTime as a number.
Use YEAR() to isolate the year portion of a DateTime.
YEAR(D)
YEAR() returns a numeric value denoting the year portion of a DateTime.
Regardless of the date format in which a DateTime is stored, YEAR() returns a 4-digit numeric year.
If the DateTime is purely a time or is is invalid/blank, then YEAR() returns a zero value.
Valid dates are in the range January 2, 1900 to December 31, 9999.
Using a date of August 14, 2012:
YEAR(‘20120814‘) = 2012