How do I retrieve data from the current week in MySql?

advertisements

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)