Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Processing Time
Hi,
I didnīt find information how to process time in SQL. Are ther any
functions to get a number into a format readable for human beings. If I
subtract one date from another I always get the Difference in days. How do
I get the difference in years, or hours?
Example: SELECT TO_DATE('2000','YYYY') -TO_DATE('1999','YYYY') FROM DUAL
Result: 366
Example: SELECT TO_DATE('21:00','HH24:MI') -TO_DATE('19:30','HH24:MI')
FROM DUAL
Result: ,020833333
I donīt want to get 0,0625..... I want to see something like 1 H 30 Minutes!
I know functions like months_between but are ther others to fomat dates ams times?
Thanks
Thomas
Received on Fri Nov 30 2001 - 08:14:43 CST
![]() |
![]() |