Re: using dates in pgsql - Mailing list pgsql-novice

From Tom Lane
Subject Re: using dates in pgsql
Date
Msg-id 21605.1062044920@sss.pgh.pa.us
Whole thread Raw
In response to using dates in pgsql  (JohnH <JohnH@atkgib.com.au>)
Responses Re: using dates in pgsql
List pgsql-novice
JohnH <JohnH@atkgib.com.au> writes:
> But I want to use a variable in the WHERE option
> WHERE  activedate < (current date less 188 days)

You're going to be embarrassed...

WHERE  activedate < (CURRENT_DATE - 188)

            regards, tom lane

pgsql-novice by date:

Previous
From: Bruno LEVEQUE
Date:
Subject: Re: Database names and pg_dump
Next
From: Ron Johnson
Date:
Subject: Re: using dates in pgsql