I want to retrieve current week data from MySql.
For example : Previous Sunday to Saturday from current day.
How can i do that? Please help me.
Thanks in advance :)
Your date field must of datetime type
and sql query will be like :
SELECT *
FROM TABLE_NAME
WHERE yearweek(DATE(field_name), 1) = yearweek(curdate(), 1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With