Reputation: 61
SELECT
*
FROM
table_temp
WHERE
install_date < NOW()
AND install_date > DATE_FORMAT(2011 - 06 - 16, "%Y-%m-%d")
Upvotes: 0
Views: 46
Reputation: 146360
The problem resides on theis line:
install_date > DATE_FORMAT(2011 - 06 - 16, "%Y-%m-%d")
The 1st variable should be a string of a date
For example:
SELECT DATE_FORMAT('2007-10-04 22:23:00', '%H:%i:%s');
Or in your case:
install_date > DATE_FORMAT('2011 - 06 - 16', "%Y-%m-%d")
Upvotes: 2