Re: Int to Interval conversion
От
Adrian Klaver
Тема
Re: Int to Interval conversion
Дата
Msg-id
201009140634.24357.adrian.klaver@gmail.com
Ответ на
Int to Interval conversion (Howard Cole)
Список
Дерево обсуждения
Int to Interval conversion Howard Cole <howardnews@selestial.com>
Re: Int to Interval conversion Michael Glaesemann <grzm@seespotcode.net>
Re: Int to Interval conversion Adrian Klaver <adrian.klaver@gmail.com>
Re: Int to Interval conversion Bill Moran <wmoran@potentialtech.com>
Re: Int to Interval conversion Szymon Guz <mabewlun@gmail.com>
On Tuesday 14 September 2010 4:57:46 am Howard Cole wrote: > 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. test=> SELECT 1440 * interval '1 min'; ?column? ---------- 24:00:00 (1 row) -- Adrian Klaver adrian.klaver@gmail.com
В списке pgsql-general по дате отправления