Skip to content
Advertisement

How to compare time in mysql

I have a column of Time data type in mysql. I want to compare the time with a time string but don’t know how to compare it. e.g., I want to know that some specific time is greater than 10:30:00. How can I check it? I have this query but it is not showing any result although the data is available. what I am doing wrong?

Advertisement

Answer

You can use the TIME_FORMAT function, like this:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement