Answers for "oracle get difference between two dates"

SQL
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
Posted by: Guest on March-15-2021
1

oracle difference between two dates in years

select floor(months_between(date '2012-10-10', date '2011-10-10') /12) from dual;

select floor(months_between(date '2012-10-9' , date '2011-10-10') /12) from dual;
Posted by: Guest on November-20-2020

Code answers related to "oracle get difference between two dates"

Code answers related to "SQL"

Browse Popular Code Answers by Language