oracle date difference code example
Example 1: oracle difference between two dates in seconds
SELECT (END_DT - START_DT) * 60 * 60 * 24 FROM MY_TABLE; -- Seconds
SELECT (END_DT - START_DT) * 60 * 24 FROM MY_TABLE; -- Minutes
SELECT (END_DT - START_DT) * 24 FROM MY_TABLE; -- Hours
Example 2: oracle difference between two dates in days
v_numvar := dt1-dt2;