Skip to content
Advertisement

Where condition with a specific hour and minute from a Timestamp SQL

I have to search for a particular hour and minute within a column of a table.

For example:

I wanted to run a query like this:

Is there a way to do it?

Advertisement

Answer

In standard SQL, you would use:

However, not all databases support extract(), so your database might have bespoke syntax.

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