Problem with showing time diff? - Mailing list pgsql-general

From Bjørn T Johansen
Subject Problem with showing time diff?
Date
Msg-id 41934525.1020305@havleik.no
Whole thread Raw
Responses Re: Problem with showing time diff?
List pgsql-general
I have the following select:

select to_char((Log_Fortrykk.SistePlate::time -
OrdreNew.SistePlate::time)::interval,'HH24:MI') as diff from Log_Fortrykk

I need the output to be HH:MM, e.g. 00:09... But my prb is when this diff is less than 0,
it shows as 00:-9 and not -00:09

How can I fix this?


Regards,

BTJ

--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

btj@havleik.no
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Last value inserted
Next
From: Tom Larard
Date:
Subject: implicit casting problem