Skip to content
Advertisement

Compare two time strings in SQL

I have a string variable that denotes a time:

I need to check if the current time getdate() is after or before @time. How can I do this in SQL?

Advertisement

Answer

This should do it:

SQL 2008+

Earlier:

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