Extracting Years, Quarters, Months, and Weeks : Introduction « Date Time Functions « MySQL Tutorial

MySQL has a range of function for extracting numerical data from a date:

  1. YEAR(date)
  2. QUARTER(date)
  3. MONTH(date)
  4. WEEK(date[,firstday])
  5. YEARWEEK(date[,firstday])

14.1.1.Date and Time Functions
14.1.2.Extraction Functions
14.1.3.Changing Date Values
14.1.4.Getting Day Information
14.1.5.Getting Names for Months and Days
14.1.6.Extracting Years, Quarters, Months, and Weeks
14.1.7.Current Date and Time
14.1.8.Days Since 1 A.D.
14.1.9.Seconds Since the Beginning of the Day