Re: Formatting count of seconds to date format using SQL?
From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 13 Dec 1999 13:51:20 -0500
Message-ID: <6qfa5s4af7td8da91h5nfcgcpelmi052n2_at_4ax.com>
13 13:53:49
Date: Mon, 13 Dec 1999 13:51:20 -0500
Message-ID: <6qfa5s4af7td8da91h5nfcgcpelmi052n2_at_4ax.com>
[Quoted] A copy of this was sent to Jan-Helge Bergesen <jhb_at_protek.no> (if that email address didn't require changing) On Mon, 13 Dec 1999 19:28:27 +0100, you wrote:
>Hello!
>
>Is there a way to format a count of seconds into a format like 'DD
>HH:MI:SS' ?
>
>I'm a bit frustrated here...
a count of seconds since when? If you know when the seconds are from it is as easy as:
select to_char( WHENCE + (SECONDS * (1/24/60/60)), 'DD HH24:MI:SS' ) from dual;
If it is the numer of seconds since midnight for example:
1* select to_char( trunc(sysdate) + (50029*(1/24/60/60)), 'DD HH24:MI:SS' )
from dual
tkyte_at_8i>
TO_CHAR(TRU
13 13:53:49
will get it for you.
-- See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA [Quoted] Opinions are mine and do not necessarily reflect those of Oracle CorporationReceived on Mon Dec 13 1999 - 19:51:20 CET