I’m storing the time in the attendance table in this format (00:00:00)..
Now i need to find the login data stored before 09:00:00.
I’m using this query to find the data.
SELECT user_name,
time_in
FROM attendance
WHERE user_name='Vignesh'
AND time_in < 09:20:59
This thing is not working for me. Is there any other method to get the data’s before 09:00:00 from the DB?
You need to enclose it in quotes:
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html