Re: subtracting minutes from date - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: subtracting minutes from date
Date
Msg-id 20060224060335.GA2481@wolff.to
Whole thread Raw
In response to subtracting minutes from date  ("Brandon Metcalf" <bmetcalf@nortel.com>)
List pgsql-general
On Thu, Feb 23, 2006 at 13:55:34 -0600,
  Brandon Metcalf <bmetcalf@nortel.com> wrote:
>
> If I have a column called date with data type timestamp without time
> zone I know I can use
>
>   SELECT * FROM table WHERE date < (now()::DATE - 7)::TIMESTAMP;

You can do this without converting to timestamp:
SELECT * FROM table WHERE date < current_date - 7;

pgsql-general by date:

Previous
From: Wes
Date:
Subject: ECPG and COPY
Next
From: Michael Fuhr
Date:
Subject: Re: ECPG and COPY