year
Description
Syntax:
INT YEAR(DATETIME date)
This function fetches the year part of the given date, and returns a value ranging from 1000 to 9999.
The parameter is of DATE or DATETIME type.
Example
mysql> select year('1987-01-01');
+-----------------------------+
| year('1987-01-01 00:00:00') |
+-----------------------------+
| 1987 |
+-----------------------------+
Keywords
YEAR