YEAR() in MySQL — How It Works

What the MySQL YEAR() function does, with an example.

Published October 20, 2026

YEAR() extracts the year from a date value.

Key points

  • Part of standard SQL functions available in MySQL for working with dates and times

Example

SELECT YEAR(created_at) FROM orders;
More SQL articles