oracle convert run duration to number

Solutions on MaxInterview for oracle convert run duration to number by the best coders in the world

showing results for - "oracle convert run duration to number"
Luka
21 May 2020
1-- Duration between 2 timestamps
2SELECT (extract(DAY FROM TIME2 - TIME1) * 24 * 60 * 60) 
3           + (extract(HOUR FROM TIME2 - TIME1) * 60 * 60) 
4           + (extract(MINUTE FROM TIME2 - TIME1) * 60) 
5           + extract(SECOND FROM TIME2 - TIME1)
6FROM DUAL;