Home » SQL & PL/SQL » SQL & PL/SQL » Convert secons in hours more than 24 (Convert secons in hours more than 24)
Convert secons in hours more than 24 [message #274470] Tue, 16 October 2007 03:19 Go to next message
osgeludi
Messages: 2
Registered: October 2007
Junior Member
Please, anybody knows a simple function to convert seconds in hours more than 24 (Hours, minutes and seconds).
The tradicional format HH24:MI:SS isn't enough when I need write more than 24 hours.

Thanks.
Re: Convert secons in hours more than 24 [message #274475 is a reply to message #274470] Tue, 16 October 2007 03:34 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> with data as (select 123456 seconds from dual)
  2  select trunc(seconds/3600) hours,
  3         trunc(mod(seconds,3600)/60) minutes,
  4         mod(seconds,60) seconds
  5  from data
  6  /
     HOURS    MINUTES    SECONDS
---------- ---------- ----------
        34         17         36

1 row selected.

Regards
Michel
Re: Convert secons in hours more than 24 [message #274491 is a reply to message #274475] Tue, 16 October 2007 04:05 Go to previous message
osgeludi
Messages: 2
Registered: October 2007
Junior Member
Thanks a lot Michel.

That's a good solution.

Regards. Razz
Previous Topic: 3D PLSQL table
Next Topic: Facing problem using rank function.........
Goto Forum:
  


Current Time: Fri Dec 09 17:21:55 CST 2016

Total time taken to generate the page: 0.58796 seconds