F
F
fr0zen2017-10-05 08:51:01
PostgreSQL
fr0zen, 2017-10-05 08:51:01

How to get the smallest date value in postgres?

There is such a condition in sql query:

"Group" >= COALESCE($7 :: INT, -100) AND COALESCE("Group" <= $8 :: INT, 100)

If the parameters $7 and $8 are present, then they set the range of values ​​within which you want to find the rows. It is necessary to make a similar condition for the date field. How can I set the minimum and maximum allowed date value?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gill-sama, 2017-10-05
@fr0zen

postgres can compare dates as well as numbers
and also has a BETWEEN operator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question