Re: extract last months data - Mailing list pgsql-sql

From Thomas Lockhart
Subject Re: extract last months data
Date
Msg-id 395A07D2.9947951F@alumni.caltech.edu
Whole thread Raw
In response to extract last months data  (Antti Linno <alligator@all.ee>)
List pgsql-sql
> I just want to extract last months data, but I don't know whether the
> month ended with 29,30 or 31 (external program, that uses postgres),
 select * from t1   where d >= (date_trunc('month', timestamp 'today')       - interval '1 month')     and d <
date_trunc('month',timestamp 'today');
 
                   - Thomas


pgsql-sql by date:

Previous
From: Guillaume Perréal
Date:
Subject: Re: extract last months data
Next
From: Andrés Mauricio Marín Restrepo
Date:
Subject: HI! Problems with cursors into triggers