Monday, February 6, 2012

Calculating difference of dates in Oracle

November 18, 2009 by · Leave a Comment 

How to calculate difference between two dates in oracle, as subtraction of dates returns numeric value as difference. With some slight changes/enhancements we can track back the subtraction values to some readable date formats: Here are some examples, these can also be amended for user convenience: SQL> SELECT floor(((date1-date2)*24*60*60)/3600) 2 || ‘ HOURS ‘ || [...]