Re: Question on interval

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Question on interval
Дата
Msg-id 1177099866.24411.30.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на Question on interval  (Wei Weng <wweng@kencast.com>)
Список pgsql-sql
On Fri, 2007-04-20 at 13:53, Wei Weng wrote:
> Hi all.
> 
> How do I write a query that converts an interger to the interval type?
> 
> Like convert integer 10 to INTERVAL '10 seconds'?
> 
> The integer is a column in a table though, so it is more like convert 
> integer tbl.theInteger to INTERVAL 'tbl.theInteger seconds".

A lot of the times, it's easiest to multiply it:

select ..... where somedatefield > now() - interval '1 minute' * 5


В списке pgsql-sql по дате отправления:

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: Question on interval
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: Question on interval