Re: timestamp calculations - Mailing list pgsql-general

From Stephan Szabo
Subject Re: timestamp calculations
Date
Msg-id Pine.BSF.4.21.0101251604001.86836-100000@megazone23.bigpanda.com
Whole thread Raw
In response to timestamp calculations  (Steve Leibel <stevel@bluetuna.com>)
List 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?


pgsql-general by date:

Previous
From: Steve Leibel
Date:
Subject: timestamp calculations
Next
From: "Valter Mazzola"
Date:
Subject: Re: Connection pooling