1SELECT (END_DT - START_DT) * 60 * 60 * 24 FROM MY_TABLE; -- Seconds
2SELECT (END_DT - START_DT) * 60 * 24 FROM MY_TABLE; -- Minutes
3SELECT (END_DT - START_DT) * 24 FROM MY_TABLE; -- Hours
1-- All dates between 01/01/2021 and 15/01/2021
2SELECT to_date('01/01/2021', 'DD/MM/YYYY') + ROWNUM - 1
3FROM ALL_OBJECTS
4WHERE ROWNUM <= to_date('15/01/2021', 'DD/MM/YYYY')
5 - to_date('01/01/2021', 'DD/MM/YYYY') + 1;
1select floor(months_between(date '2012-10-10', date '2011-10-10') /12) from dual;
2
3select floor(months_between(date '2012-10-9' , date '2011-10-10') /12) from dual;
4