How to use greater than operator with date?
In your statement, you are comparing a string called start_date with the time.
If start_date is a column, it should either be
SELECT * FROM `la_schedule` WHERE start_date >'2012-11-18';
(no apostrophe) or
SELECT * FROM `la_schedule` WHERE `start_date` >'2012-11-18';
(with backticks).
Hope this helps.
you have enlosed start_date
with single quote causing it to become string, use backtick
instead
SELECT * FROM `la_schedule` WHERE `start_date` > '2012-11-18';
- SQLFiddle Demo