Re: formating interval question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: formating interval question
Дата
Msg-id 21534.1096036651@sss.pgh.pa.us
обсуждение исходный текст
Ответ на formating interval question  (mike <mike@bristolreccc.co.uk>)
Список pgsql-general
mike <mike@bristolreccc.co.uk> writes:
> I have an interval field which is used to calculate total hours.
> At present it outputs as days hours minutes
> Is there any way to output as total hours

You could always EXTRACT(EPOCH ...) to get total seconds and then
divide.  I am not sure whether EXTRACT(HOUR ...) would give the
same answer, or just the hours portion of the normal printout.
But anyway, see EXTRACT.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Large arrays give long lag on server side before command executes
Следующее
От: Amin Abdulghani
Дата:
Сообщение: Removed and then missing pg_clog file