| From: | Bjørn T Johansen <btj(at)havleik(dot)no> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Problem with showing time diff? |
| Date: | 2004-11-11 10:55:33 |
| Message-ID: | 41934525.1020305@havleik.no |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)havleik(dot)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"
-----------------------------------------------------------------------------------------------
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Shridhar Daithankar | 2004-11-11 12:16:25 | New Opteron server from pogo linux |
| Previous Message | Björn Platzen | 2004-11-11 08:53:19 | Re: Can't insert date in field with foreign key |