Int to Interval conversion

Поиск
Список
Период
Сортировка
От Howard Cole
Тема Int to Interval conversion
Дата
Msg-id 4C8F633A.7070906@selestial.com
обсуждение исходный текст
Ответы Re: Int to Interval conversion  (Bill Moran <wmoran@potentialtech.com>)
Re: Int to Interval conversion  (Szymon Guz <mabewlun@gmail.com>)
Re: Int to Interval conversion  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: Int to Interval conversion  (Michael Glaesemann <grzm@seespotcode.net>)
Список pgsql-general
  Hi everyone,

I have a table with a duration field, stored as an Integer. How can I
retrieve this from the table as an Interval type?

E.g.

create table test (test_id serial primary key, time_in_minutes int);
insert into test values (1440);

Now how do I extract that as 24:00:00::interval in a query?

Thanks.

Howard Cole.

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

Предыдущее
От: Aaron
Дата:
Сообщение: Re: What filesystem to use for postgres?
Следующее
От: Bill Moran
Дата:
Сообщение: Re: Int to Interval conversion