I want to compare a date from a database that is between 2 given dates. The column from the database is DATETIME, and I want to compare it only to the date format, not the d
This works for me:
select date_format(date(starttime),'%Y-%m-%d') from data where date(starttime) >= date '2012-11-02';
Note the format string '%Y-%m-%d' and the format of the input date.