You are here: Functions > YEAR()

YEAR()

YEAR() returns the year portion of a specified DateTime as a number.

Use YEAR() to isolate the year portion of a DateTime.

Function Format

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.

Examples

Using a date of August 14, 2012:

YEAR(‘20120814‘) = 2012