SELECT * FROM `travail` WHERE Convert(datetime, `dateReception`)=(datetime, '01/01/2014' ) The value of dateReception is 2014-01-01 but it's a varchar not date
You can use STR_TO_DATE() function:
SELECT * FROM travail WHERE DATE(dateReception) = STR_TO_DATE('01/01/2014', '%d/%m/%Y') dateReception is in YYYY-MM-DD format, not DD/MM/YYYY formatIf your varchar is like this:
8/11/2011 20:14 PM Then you can do something like this:
SELECT DATE_FORMAT(STR_TO_DATE('8/11/2011 20:14 PM', '%c/%e/%Y %H:%i'), '%Y-%m-%d %H:%m:%s')