HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
MySQL Functions : Return the week number for a date
The WEEKOFYEAR() function returns the week number for a given date (a number from 1 to 53).
WEEKOFYEAR(date)
Parameter | Description |
---|---|
date | Required. The date or datetime to extract the week number from |
Works in: | From MySQL 4.0 |
---|
Return the week number for a date:
SELECT WEEKOFYEAR("2017-01-01");
Return the week number for the current system date:
SELECT WEEKOFYEAR(CURDATE());