select * from blah where stamp >= now()::date - 7;
I think it should work.
On Mon, 10 Jul 2000, Rob S. wrote:
> Hi all,
> I would like to say,
> "select * from blah where stamp >= 7 days ago"
> ...where the "days ago" is calculated at query time; meaning that its not
> hardcoded into the query as a date string. Is this possible?
In response to
pgsql-sql by date
|Next:||From: Adam Walczykiewicz||Date: 2000-07-11 07:16:19|
|Subject: SQL-92 SQLSTATE in PostgreSQL ?!|
|Previous:||From: Rob S.||Date: 2000-07-11 05:26:38|
|Subject: Creating timestamps in queries?|