From: | george young <gry(at)ll(dot)mit(dot)edu> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: compare month[modified] |
Date: | 2006-04-04 15:22:24 |
Message-ID: | 20060404112224.6037ccff.gry@ll.mit.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Tue, 4 Apr 2006 00:05:49 -0700 (PDT)
shakil tanvir <tanvirshakil(at)yahoo(dot)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(at)yahoo(dot)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)
From | Date | Subject | |
---|---|---|---|
Next Message | inner | 2006-04-04 16:44:36 | Re: BYTEA: insert query max size |
Previous Message | Tom Lane | 2006-04-04 13:43:03 | Re: BYTEA: insert query max size |