Mega Code Archive

 
Categories / MySQL Tutorial / Date Time Functions
 

WEEKOFYEAR(date) returns the calendar week of the date as a number in the range from 1 to 53

mysql> mysql> SELECT WEEKOFYEAR('1998-02-20'); +--------------------------+ | WEEKOFYEAR('1998-02-20') | +--------------------------+ |                        8 | +--------------------------+ 1 row in set (0.00 sec)