Does anyone know how the function months_between is calculated? We are
getting invalid results when we use 28_FEB as the end of month.
See example below:
1 select FLOOR(MONTHS_BETWEEN('31-JAN-2002', '30-may-2001')) MonthsA
2 ,FLOOR(MONTHS_BETWEEN('28-FEB-2002', '30-may-2001')) MonthsB
3 ,FLOOR(MONTHS_BETWEEN('31-MAR-2002', '30-may-2001')) MonthsC
4* from dual
SQL> /
MONTHSA MONTHSB MONTHSC
---------- ---------- ----------
8 8 10
MONTHSB should be 9.
Cameron Johnson
Information Technology Services
University Of Rochester
Rochester, New York 14620
585-273-2014
fax 585-273-1012
cell 585-451-2831
email: cameron.[Email Address Removed] to comment on our service?
http://www.uis.rochester.edu/syspub/doc/SurveyOnCall.htm Thanks.
Oracle LazyDBA home page