Re: Hour difference?

Поиск
Список
Период
Сортировка
От Steve Worsley
Тема Re: Hour difference?
Дата
Msg-id 3F411F3A.1080400@commandprompt.com
обсуждение исходный текст
Ответ на Hour difference?  (Bjørn T Johansen <btj@havleik.no>)
Ответы Re: Hour difference?  (Bjørn T Johansen <btj@havleik.no>)
Список pgsql-general
fingerless=# select '7:43'::time AS start, '12:17'::time AS end,
(('12:17'::time) - ('7:43'::time))::interval AS difference;
  start   |   end    | difference
----------+----------+------------
 07:43:00 | 12:17:00 | 04:34
(1 row)


Hope that helps.. Just subsitute your column names for the times.

--Steve


Bjørn T Johansen wrote:

>I need to compute the difference of Time fields, in the format HHMM. Is
>it possible to do the math in the Select?
>
>
>Regards,
>
>BTJ
>
>
>



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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Why lower's not accept an AS declaration ?
Следующее
От: Josh Berkus
Дата:
Сообщение: Are you an pgODBC hacker?