Problem with showing time diff?

Поиск
Список
Период
Сортировка
От Bjørn T Johansen
Тема Problem with showing time diff?
Дата
Msg-id 41934525.1020305@havleik.no
обсуждение исходный текст
Ответы Re: Problem with showing time diff?  (Michael Fuhr <mike@fuhr.org>)
Список 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 по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Last value inserted
Следующее
От: Tom Larard
Дата:
Сообщение: implicit casting problem