Re: is there a way to get hh:mm:ss given seconds

Поиск
Список
Период
Сортировка
От Kevin Brannen
Тема Re: is there a way to get hh:mm:ss given seconds
Дата
Msg-id 3D2B3559.90906@nurseamerica.net
обсуждение исходный текст
Ответ на Re: is there a way to get hh:mm:ss given seconds  (Tod McQuillin <devin@spamcop.net>)
Список pgsql-sql
Tod McQuillin wrote:
> On Mon, 8 Jul 2002, Narendra A wrote:
> 
> 
>>Is there a way in sql such that if I give seconds it should me return me
>>hours:mins:seconds
>>
>>Eg. Seconds     hh:mm:ss
>>422              1:01:02
> 
> 
> foo=# select '422 seconds'::interval;
>  interval
> ----------
>  00:07:02
> (1 row)


That works on inserts into a "time" field too, cool tip.  THANKS!

Kevin



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

Предыдущее
От: Jeff Eckermann
Дата:
Сообщение: Re: PLPGSQL language documentation
Следующее
От: Jie Liang
Дата:
Сообщение: pg_restore cannot restore index