Re: compare month - Mailing list pgsql-novice

From Kaloyan Iliev
Subject Re: compare month
Date
Msg-id 44321C88.7050208@faith.digsys.bg
Whole thread Raw
In response to compare month  (shakil tanvir <tanvirshakil@yahoo.com>)
List 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@yahoo.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.



pgsql-novice by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: compare month
Next
From: Kaloyan Iliev
Date:
Subject: Re: compare month[modified]