Skip to content
Advertisement

How to check if timestamp between two timestamps postgres?

I am working on a spring api where I am using postgres and saving a field of type timestamp with field name as created_date. Now I want to check whether this field is between two different timestamps.

Right now I am using this:

JavaScript

Is there a way I can use BETWEEN here for this operation?

Advertisement

Answer

You can do it like this:

JavaScript

If you want to do it using JDBC, check this answer and this answer.

Advertisement