Hi!
On Apr 4, 2006, at 15:58 , shakil tanvir wrote:
> Hi all of you PostGreSQL fans,
True fans spell it PostgreSQL :)
> SELECT users from userlog where lastlogindate is less than one month
> or
select users
from userlog
where lastlogindate > current_timestamp - 1 * interval '1 month';
> SELECT users from userlog where lastlogindate is less than 15 days
select users
from userlog
where lastlogindate > current_timestamp - 15 * interval '1 day';
You can also use current_date instead of current_timestamp, depending
on your desired data type.
Hope this helps!
Michael Glaesemann
grzm myrealbox com