Loading lesson path
Concept visual
Start at both ends
Return the year part of a date:
SELECT YEAR("2017-06-15");The YEAR() function returns the year part for a given date (a number from 1000 to 9999).
date )
Formula
Required. The date/datetime to extract the year fromFrom MySQL 4.0
Return the year part of a date: SELECT YEAR("2017-06-15 09:34:21");
Return the year part of the current system date:
SELECT YEAR(CURDATE());❮ MySQL Functions