Search Postgresql Archives

select date between - PostgreSQL 9.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux