jasonhuibers
Programmer
This returns the count of 3 months (which is correct):
SELECT round(MONTHS_BETWEEN (DATE '2012-12-07', DATE '2012-10-12') + 1) FROM dual;
Dec
Nov
Oct
However I am trying to return the count of 2 for the following:
SELECT round(MONTHS_BETWEEN (DATE '2013-01-07', DATE '2012-12-31') + 1) FROM dual;
This returns 1 which is incorrect - should return 2 as there is Jan and Dec...
SELECT round(MONTHS_BETWEEN (DATE '2012-12-07', DATE '2012-10-12') + 1) FROM dual;
Dec
Nov
Oct
However I am trying to return the count of 2 for the following:
SELECT round(MONTHS_BETWEEN (DATE '2013-01-07', DATE '2012-12-31') + 1) FROM dual;
This returns 1 which is incorrect - should return 2 as there is Jan and Dec...