Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01839 error when using 02/29/2008 (leap year related?)

new2sqlFeb 29 2008 — edited Feb 29 2008
I 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 28 2008
Added on Feb 29 2008
10 comments
3,099 views