Re: using dates in pgsql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: JohnH <JohnH(at)atkgib(dot)com(dot)au>
Cc: "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: using dates in pgsql
Date: 2003-08-28 04:28:40
Message-ID: 21605.1062044920@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

JohnH <JohnH(at)atkgib(dot)com(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ron Johnson 2003-08-28 09:06:03 Re: using dates in pgsql
Previous Message Tom Lane 2003-08-28 03:58:11 Re: Returning SETOF INTEGER mystery...