sql - List of months between two dates, with years in oracle -


i'm storing months, years , hours in different columns, , want sum hours when have entered 2 dates.

if have entered 2 dates suppose 03/01/2013 , 03/31/2015 should sum of hours between 03-2013 03-2015, including months , years in between.

select trunc( mod( (date1-date2)*24, 24 ) )  "hr" yourtable 

check out this article asktom.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -