0

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"?

2 Answers 2

2

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

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.