Re: compare month

From: Kaloyan Iliev <news1(at)faith(dot)digsys(dot)bg>
To: shakil tanvir <tanvirshakil(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: compare month
Date: 2006-04-04 07:13:12
Message-ID: 44321C88.7050208@faith.digsys.bg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,
SELECT users from userlog where lastlogindate > CURRENT_DATE-'1
month'::interval;
or
SELECT users from userlog where lastlogindate > CURRENT_DATE-'15
days'::interval;

I think this will work for you.

Have a nice day

shakil tanvir wrote:

> Hi all of you PostGreSQL fans,
>
> I need to run a query like
>
> SELECT users from userlog where lastlogindate is less than one month
> or
> SELECT users from userlog where lastlogindate is less than 15 days
>
> Can any one help with sql example?
>
> Shakil
> tanvirshakil(at)yahoo(dot)com
>
> ------------------------------------------------------------------------
> Yahoo! Messenger with Voice.
> <http://us.rd.yahoo.com/mail_us/taglines/postman3/*http://us.rd.yahoo.com/evt=39666/*http://beta.messenger.yahoo.com>
> PC-to-Phone calls for ridiculously low rates.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Kaloyan Iliev 2006-04-04 07:15:18 Re: compare month[modified]
Previous Message Michael Glaesemann 2006-04-04 07:10:40 Re: compare month