I have a table named questions
. In that table there is a field call question_date
. Field is datetime.
I want to check all the question those are asked between 5-7 days only.
I have tried below query but I am getting blank output. No records was there.
SELECT * FROM `questions` WHERE `question_date` < NOW() - INTERVAL 5 DAY AND question_date >= NOW()
SELECT * FROM `questions` WHERE `question_date` = DATE(DATE_ADD(NOW(), INTERVAL -2 DAY))
I have checked the below questions: