MySQL has a range of function for extracting numerical data from a date:YEAR(date)QUARTER(date)MONTH(date)WEEK(date[,firstday])YEARWEEK(date[,firstday])