Re: Tiiiiiiiiiiiiime

From: Alexander Dederer <dederer(at)spb(dot)cityline(dot)ru>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Tiiiiiiiiiiiiime
Date: 2001-05-16 21:28:11
Message-ID: 9dur9q$2h29$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hiroko wrote:
> from a DB table, I'd like to SELECT out the date of 3months before.
> the command should be
>
> => select * from MYTBL where time =XXXXXX ;
>
> what whould it like to be at XXXXX ?

Try this:
SELECT * FROM mytbl WHERE create_date > (now() - '3 month'::interval) ;

See date/time function manual.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Wolfe 2001-05-16 21:29:32 Re: Unusual slowdown using subselects
Previous Message Alex Howansky 2001-05-16 20:43:32 Re: Restore from a dead machine.