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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Elapsed Time

Re: Elapsed Time

From: Glenn Santa Cruz <glenn.santacruz_at_gmail.com>
Date: Fri, 19 May 2006 16:47:28 -0500
Message-ID: <277902c40605191447o737d6d8j5a7f8723e8306bd6@mail.gmail.com>


Another shot:

with x as (

    select to_date('2003-09-02 14:34:23','yyyy-mm-dd hh24:mi:ss') timestamp       from dual
)
select ts,

       to_char(dy,'fm000')||':'||
       to_char(hr,'fm00')||':'||
       to_char(mi,'fm00')||':'||
       to_char(se,'fm00') as pretty_time
from (select to_char(x.timestamp,'mm/dd hh24:mi:ss') ts,
             trunc( sysdate-x.timestamp ) dy,
             trunc( mod( (sysdate-x.timestamp)*24, 24 ) )  hr,
             trunc( mod( (sysdate-x.timestamp)*24*60, 60 ) )  mi,
             trunc( mod( (sysdate-x.timestamp)*24*60*60, 60 ) ) se
        from x
     )

/

On 5/19/06, Alex Gorbachev <gorbyx_at_gmail.com> wrote:
> Well, not realy coz instead of sysdate there is number of seconds.
>
> 2006/5/19, rjamya <rjamya_at_gmail.com>:
> > select to_char(sysdate,'hh24') || ' hours ' || to_char(sysdate,'mi')
> > || ' minutes ' || to_char(sysdate,'ss') || ' seconds ' from dual
> > /
> >
> > something like this won't work???
> > Raj
> > --
> > http://www.freelists.org/webpage/oracle-l
> >
> >
> >
>
>
> --
> Best regards,
> Alex Gorbachev
>
> http://oracloid.blogspot.com
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 19 2006 - 16:47:28 CDT

Original text of this message

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