TIMESTAMP difference - Mailing list pgsql-general

From rihad
Subject TIMESTAMP difference
Date
Msg-id 475D8FE6.9060504@mail.ru
Whole thread Raw
Responses Re: TIMESTAMP difference
List 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 by date:

Previous
From: Thomas Carsten Franke
Date:
Subject: Unable to ALTER table after SELECT data from table
Next
From: Thomas Carsten Franke
Date:
Subject: Unable to ALTER table after SELECT data from table