Reputation: 2306
I know this has prob been answered, but I've searched for almost an hour now and Im not finding my answer.
Here is my sql query.
SELECT *
FROM (`calendar_event`)
WHERE DATE_FORMAT(`start_time`, '%m/%d/%Y')
BETWEEN CURDATE() + INTERVAL 5 DAY AND CURDATE()
Here is the format of the start_time
column 06/30/2011 8:30 AM
The query isn't having any errors, Im just not getting any results...
Upvotes: 4
Views: 293
Reputation: 206689
BETWEEN a AND b
needs b
to be greater than a
, otherwise the interval is empty.
Try inverting the two date parameters you're building.
Upvotes: 2