Answers for "sql query to find time difference between two dates in oracle"

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
5

oracle all dates between two dates

-- All dates between 01/01/2021 and 15/01/2021
SELECT to_date('01/01/2021', 'DD/MM/YYYY') + ROWNUM - 1
FROM ALL_OBJECTS
WHERE ROWNUM <= to_date('15/01/2021', 'DD/MM/YYYY') 
	- to_date('01/01/2021', 'DD/MM/YYYY') + 1;
Posted by: Guest on July-13-2021

Code answers related to "sql query to find time difference between two dates in oracle"

Code answers related to "SQL"

Browse Popular Code Answers by Language