From: | Patrick B <patrickbakerbr(at)gmail(dot)com> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | select date between - PostgreSQL 9.5 |
Date: | 2016-09-14 00:20:51 |
Message-ID: | CAJNY3iu+6tfJw=_yFLk0tspQBfr35O+VJ0yyyGxv0d-JGwaMfg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi guys,
I got the following column:
modified_date TIMESTAMP(6) WITHOUT TIME ZONE DEFAULT
> "statement_timestamp"(),
I want to select all rows that have been modified from now to 4 months ago.
I've used these queries:
select
> modified_date,
> from
> clients
> WHERE
> modified_date BETWEEN '2016-06-13' AND '2016-09-13'
and
> select
> modified_date,
> from
> clients
> WHERE
> modified_date >='2016-06-13' AND modified_date < '2016-09-13'
But it didn't work... it returns 0 rows.... but there are rows to be shown:
select modified_date from clients ORDER BY modified_date ASC
modified_date
> -------------------
> 2015-07-11 17:23:40
> 2016-09-13 20:00:51
> 2016-09-13 20:00:51
> 2016-09-13 20:00:51
> 2016-09-13 20:00:51
What am I doing wrong?
Cheers
Patrick
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2016-09-14 00:38:11 | Re: select date between - PostgreSQL 9.5 |
Previous Message | Adrian Klaver | 2016-09-13 23:39:06 | Re: Installing 9.6 RC on Ubuntu [Solved] |