user3681580
user3681580

Reputation: 57

MySQL Get All Records for the next week

I'm trying to get all of the records in my database for the next week.

Here is the query I'm using, but it's producing 0 results

SELECT * FROM snip WHERE WEEKOFYEAR(init_visit_start)=WEEKOFYEAR(NOW());

Here is a small data example:

enter image description here

Upvotes: 0

Views: 90

Answers (1)

Praveen Prasannan
Praveen Prasannan

Reputation: 7123

YEARWEEK

SELECT * FROM snip WHERE YEARWEEK(init_visit_start) = YEARWEEK(NOW()) + 1;

Upvotes: 1

Related Questions