Re: Date Comparison Help

From: jseymour(at)LinxNet(dot)com (Jim Seymour)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Date Comparison Help
Date: 2004-04-08 22:31:32
Message-ID: 20040408223132.AB4AE4307@jimsun.LinxNet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Brian C. Doyle" <bdoyle(at)umpa-us(dot)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(at)LinxNet(dot)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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Cohen 2004-04-08 22:35:59 Re: pg_ctl problem
Previous Message Jim Seymour 2004-04-08 21:59:41 Re: pg_ctl problem