Re: timestamp calculations

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: timestamp calculations
Дата
Msg-id Pine.BSF.4.21.0101251604001.86836-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на timestamp calculations  (Steve Leibel <stevel@bluetuna.com>)
Список 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 по дате отправления:

Предыдущее
От: Steve Leibel
Дата:
Сообщение: timestamp calculations
Следующее
От: "Valter Mazzola"
Дата:
Сообщение: Re: Connection pooling