ORA-01839 error when using 02/29/2008 (leap year related?)
new2sqlFeb 29 2008 — edited Feb 29 2008I am using the following query to find the birth year based on age which was working fine until today (02/29/2008).
select to_char(sysdate - numtoyminterval(:age,'YEAR'),'YYYY') from dual;
Today if the value of age can not be divided by 4 or zero (0, 4, 8, 12, 16 ...) it is giving ORA-01839 error. Does any one has any idea what is causing this error? Does it a bug in the numtoyminterval function? Any suggestions will be truly appreciated.