I have been shocked by Paul Moen article on MONTHS_BETWEEN.
Here is my own case :
SQL> select months_between( date '2000-03-01', date '2000-02-28') * 31 from dual;
4
Incredible! I have always been very careful with months_between because of the documented end_of_month behaviour (there is one month between 30-APR and 31-MAY), but I did not know the fractional part of add_months was based on a 31-day month 👿
update: but it is documented
Salut Laurent,
To give credit where credit is due – this one is by Paul Moen not me. 🙂
Orablogs makes all Pythian Group blogs (over a dozen authors) look like they come from me but I plan to work with Brian Duff on that at some point to fix it.
Cheers
Paul
Thanks for the clarification. I edited the title of this post (but not the URL to avoid broken link).
I hope this is acceptable