tags:

views:

27

answers:

2

i have a datetime string in my DB like "2010-08-15 00:00:00" how do i query only the time part. suppose i want to retrieve all rows that have the time "00:20:00"?

+1  A: 
WHERE DATE_FORMAT('2007-10-04 22:23:00', '%H:%i:%s') = '00:20:00'
ITroubs
+2  A: 

WHERE TIME(datetimefield) = '00:00:00'

a1ex07