add_months function bugged for the last day of month?
Hi,
i have a wired behavior of the add_months function.
My current sysdate is 21 february, so +7 days is 28. february or last day of month. Adding one or two month to this date i would expect getting 28. March/April, but i actually get 31. March or 30 April!
select sysdate+6 from dual; -> 27.2
select sysdate+7 from dual; -> 28.2
select add_months(sysdate+6,1) from dual; -> 27.3
select add_months(sysdate+7,1) from dual; -> 31.3
select add_months(sysdate+7,2) from dual; -> 30.4
Shouldn't it return 28.3 and 28.4 by adding one month?
Regards
Thomas