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!

string to date conversion

636380May 7 2008 — edited May 7 2008
hi,

i have written a decode using to_date conversion as

select to_date(decode(01011946,'00000000',null,to_date('01011946','ddmmyyyy'))) from dual.

the purpose is , the source file i am reading is a txt file. in which the Date comes as 01011946 format.

i am reading this usinga plsql procedure
decode(substr(txt,122,8),'00000000',null,to_date(substr(txt,122,8),'ddmmyyyy')), basic dob

the target table column is DATE data type .

now for this DOB 01011946...its writting 1/1/2046.


wats the issue and how do i fix it? so that is shows 01/01/1946.

kindly help.

thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2008
Added on May 7 2008
3 comments
731 views