Re: timestamp calculations
Stephan Szabo <sszabo@megazone23.bigpanda.com>
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Steve Leibel <stevel@bluetuna.com>
Cc: pgsql-general@postgresql.org
Date: 2001-01-26T00:05:56Z
Lists: pgsql-hackers, pgsql-general
Assuming adddate does what seems obvious, you should just be able to add intervals to timestamps ... last_login + '30 minutes' > now() On Thu, 25 Jan 2001, Steve Leibel wrote: > Hello, > > I'm converting a mysql db to postgres and ran into this line of code: > > $SQL = "select username from users where user_id = ? AND session = ? > AND ADDDATE(last_login, INTERVAL 30 MINUTE)>CURRENT_TIMESTAMP() > > How do I implement adddate to get this kind of funcionality?