get week from date mysql code example
Example 1: this week mysql
SELECT *
FROM your_table
WHERE YEARWEEK(`date`, 1) = YEARWEEK(CURDATE(), 1)
Example 2: mysql get day of week
DAYOFWEEK();//(1 for Sunday,2 for Monday …… 7 for Saturday )
SELECT *
FROM your_table
WHERE YEARWEEK(`date`, 1) = YEARWEEK(CURDATE(), 1)
DAYOFWEEK();//(1 for Sunday,2 for Monday …… 7 for Saturday )