MySQLDate/Time FunctionsYEAR
TIME

YEARDate/Time Functions

MONTH

Returns the year.

Syntax

YEAR(date)

Example

Enter values below to update the example in real time.

employee_id
hire_date
hire_year
employees
SELECT employee_id, YEAR(hire_date) AS hire_year
FROM employees
ORDER BY hire_year;