Re: compare month[modified] - Mailing list pgsql-novice

From george young
Subject Re: compare month[modified]
Date
Msg-id 20060404112224.6037ccff.gry@ll.mit.edu
Whole thread Raw
In response to compare month[modified]  (shakil tanvir <tanvirshakil@yahoo.com>)
List pgsql-novice
On Tue, 4 Apr 2006 00:05:49 -0700 (PDT)
shakil tanvir <tanvirshakil@yahoo.com> threw this fish to the penguins:

> Hi all of you PostGreSQL fans,
>
> I need to run a query like
>
> SELECT users from userlog where lastlogindate is less than one month of current date
> or
> SELECT users from userlog where lastlogindate is less than 15 days of current date

The "age" builtin function is handy in these circumstances:

  select users from userlog where age(lastlogindate) < '1 month';


> Can any one help with sql example?
>
> Shakil
> tanvirshakil@yahoo.com
>
>
> ---------------------------------
> Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.


--
"Are the gods not just?"  "Oh no, child.
What would become of us if they were?" (CSL)

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: BYTEA: insert query max size
Next
From: inner
Date:
Subject: Re: BYTEA: insert query max size