Re: Date Comparison Help - Mailing list pgsql-general

From jseymour@LinxNet.com (Jim Seymour)
Subject Re: Date Comparison Help
Date
Msg-id 20040408223132.AB4AE4307@jimsun.LinxNet.com
Whole thread Raw
In response to Date Comparison Help  ("Brian C. Doyle" <bdoyle@umpa-us.com>)
List pgsql-general
"Brian C. Doyle" <bdoyle@umpa-us.com> wrote:
>
>
> Hello all,
>
> I am rather confident that this has been answered in the past but searching
> for it has been a pain so I am asking for some assistance.
>
> I need a query to get data that is 6 months older than "today" or when that
> query is run.
>
> So the where clause is something like
>
> WHERE table.date >= now() - 6 months
>
> I know that will not work so how should I do this?

WHERE age(table.date) > '6 months'

--
Jim Seymour                | Spammers sue anti-spammers:
jseymour@LinxNet.com       |     http://www.LinxNet.com/misc/spam/slapp.php
http://jimsun.LinxNet.com  | Please donate to the SpamCon Legal Fund:
                           |     http://www.spamcon.org/legalfund/

pgsql-general by date:

Previous
From: jseymour@LinxNet.com (Jim Seymour)
Date:
Subject: Re: pg_ctl problem
Next
From: Alexander Cohen
Date:
Subject: Re: pg_ctl problem