Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

InCorrect MONTHS_BETWEEN Oracle Bug ?

503901Sep 19 2007 — edited Sep 19 2007
SELECT MONTHS_BETWEEN('29-feb-2008','30-aug-2007') FROM dual

5.96774193548387

For the Below Query i am getting the Result as 5.96774193548387

But if use 31-aug-2007 or 29-aug-2007 instead of 30-aug-2007 i am getting the result as exactly 6, is this a oracle bug ? how can i get the correct month difference between ('29-feb-2008','30-aug-2007') ?

SELECT MONTHS_BETWEEN('29-feb-2008','31-aug-2007') FROM dual

6

Message was edited by:
George Bose

Message was edited by:
George Bose
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 17 2007
Added on Sep 19 2007
8 comments
1,371 views