I'm working on Oracle. As you can understand from the title, the problem is in this code:
select TO_DATE( '21991231', 'YYYYMMDD' ) from dual;
And the result is:
31/12/2199
I want to achieve this result:
21991231
Why is Oracle doing this? How can escape this problem?