months_between problem
161787Mar 13 2008 — edited Mar 17 2008Hello all,
select add_months(to_date('30-may-2007'), 9) from dual;
I got 29-FEB-2008.
Then,
select months_between(to_date('29-FEB-2008'), to_date('30-may-2007'))
from dual;
I got 8.97, it is not exact 9 months.
I think it is related to leap year. But my codes need to get exact 9 months to date, I can't use round.
How should I do?
Thanks.