E
E
Eserchik2019-04-10 00:15:12
PostgreSQL
Eserchik, 2019-04-10 00:15:12

How to make select by timestamp column having date only?

Hello, please help me with a request.
Postgresql timestamp(2019-04-07 13:36:06.885) column.
How to find data for a specific date without hours and minutes, i.e. having only the date 2019-04-07;

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Konstantin Tsvetkov, 2019-04-10
@Eserchik

select *
from the_table
where the_timestamp_column::date = date '2019-04-07'

R
Rsa97, 2019-04-10
@Rsa97

`timestamp` >= :date AND `timestamp` < :date + INTERVAL 1 DAY

N
Nick V, 2019-04-10
@half-life

https://www.postgresql.org/docs/current/functions-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question