Mysql Like and between
Posted: Fri Jul 16, 2010 8:27 am
i want records which is having its time between 10:00 to 02:00. i have used datetime datatype in mysql.
the query for selecting particular time entry will be like this.
SELECT * FROM `AttendanceScanDetails` WHERE `DateTime` LIKE '%10:30%'
i wanted to select some thing like this
SELECT * FROM `AttendanceScanDetails` WHERE `DateTime` BETWEEN '%10:00%' AND '%20:00%'
please help.
the query for selecting particular time entry will be like this.
SELECT * FROM `AttendanceScanDetails` WHERE `DateTime` LIKE '%10:30%'
i wanted to select some thing like this
SELECT * FROM `AttendanceScanDetails` WHERE `DateTime` BETWEEN '%10:00%' AND '%20:00%'
please help.