'Oracle - Calculate the difference between dates and extract days and hours only in Oracle
I have a query that calculates the difference between two dates and returns a decimal date. I would just like to extract days and hours from the final calculated date.
This is my query.
select sysdate - (to_date('24/AUG/2021 14:00:00', 'DD/MON/YYYY HH24:MI:SS')) as FinalDate from dual;
| FinalDate |
|---|
| 162.013252314814814814814814814814814815 |
How do I get my desired output:?
Desired output
| Days | Hours |
| -------- | ------|
|162 |0.24 |
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
