Show records from now() till next 7 days in mysql

I would submit that the most elegant way would be:

WHERE `date` BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 7 DAY)

Edit: this doc page is like the most useful thing ever. Bookmark it, because it is totally handy.


I am also posting the query which worked for me

where matchdate BETWEEN CURDATE() AND DATE_ADD(CURDATE(),INTERVAL 7 DAY) This worked if above example doesn't work then try this.


You could use the INTERVAL modifier to add a week to the current time as follows:

...WHERE date >= NOW() AND date <= NOW() + INTERVAL 7 DAY;

Tags:

Mysql