TIMESTAMP difference

Поиск
Список
Период
Сортировка
От rihad
Тема TIMESTAMP difference
Дата
Msg-id 475D8FE6.9060504@mail.ru
обсуждение исходный текст
Ответы Re: TIMESTAMP difference  ("Rodrigo De León" <rdeleonp@gmail.com>)
Список pgsql-general
Hi, is there a way to get the difference in hours between two
timestamps? The HH{1,}:MM:SS format will do.

foo=> select timestamp '20071211 00:00' - timestamp '20071210 00:01';
  ?column?
----------
  23:59:00
(1 row)

foo=> select timestamp '20071211 00:00' - timestamp '20071209 01:00';
     ?column?
----------------
  1 day 23:00:00
(1 row)

Any way to make it return "47:00:00" instead? select interval '47:00:00'
is still a legal interval as far as postgresql goes.

8.3-beta2 (can't get to beta4: freebsd ports are yet frozen :(

Thanks.

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

Предыдущее
От: Thomas Carsten Franke
Дата:
Сообщение: Unable to ALTER table after SELECT data from table
Следующее
От: Thomas Carsten Franke
Дата:
Сообщение: Unable to ALTER table after SELECT data from table