Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How to format time invervals?

How to format time invervals?

From: Lothar Armbrüster <l.armbruester_at_vertriebsunion.de>
Date: 31 Mar 2003 23:38:04 -0800
Message-ID: <35559896.0303312338.50e01255@posting.google.com>


Hello out there,
I'm trying to format some datetime invervals:

select

   to_char(numtodsinterval(elapsed_seconds,'SECOND'),'DDD HH24:MI:SS') from

   v$session_longops where rownum<10;

But I always get the default format back:

TO_CHAR(NUMTODSINTERVAL(ELAPSE



+000000000 00:00:15.000000000
+000000000 00:00:16.000000000
+000000000 00:04:58.000000000
+000000000 00:00:18.000000000
+000000000 00:05:42.000000000
+000000000 00:00:16.000000000
+000000000 00:00:17.000000000
+000000000 00:00:18.000000000
+000000000 00:00:39.000000000

The Oracle docs don't give any hint how to format these intervals. Obviously, the format models for the date datatype don't work for intervals.

Can anyone tell me how to do it right?

I use Oracle 9.0.1.3.1 on W2k.

Many thanks in advance,
Lothar Received on Tue Apr 01 2003 - 01:38:04 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US