Originally Posted by
groovekarki
I have imported data from a fixed length format file into an external table in oracle which has several date fields in the format MMDDCCYY. I want to convert this into YYYYMMDD and insert it into another table in oracle with date field. A subset of the values to be converted is given below:
DOB
01051152
10581111
08151160
01031151
05131151
01111126
01511123
11531112
08531161
06301162
05521111
06511115
Any idea anybody.......
Does your database really stores people born in the 12th century?
Code below will do the trick...
HTML Code:
select to_char(to_date('01051152','MMDDYYYY'),'YYYYMMDD')
from dual;
11520105