| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Elapsed Time
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-lReceived on Fri May 19 2006 - 16:47:28 CDT
![]() |
![]() |