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
Post a Comment