Hi,
I have a different date formats in the varchar data type. The table has millions of records, I need to convert different type of date formats in to a common date format(yyyyMMdd).
I have wrote a SQL to convert the
SELECT SNO,DECODE(INSTR(DT,'-'),5,TRANSLATE(DT,'Z-','Z'),
0,DT,
3,TRANSLATE(TO_CHAR(TO_DATE(SUBSTR(DT,1,11),'DD-MON-YY'),'YYYY-MM-DD'),'Z-','Z')) AS "NEW DT",DT FROM TESTING
But it supports the only set of formats.
We have any thing to ignore those records and to continue with other records to convert in SQL or we need to do with the PLSQL alone.
Pls advise
Regards,
Vijayaraghavan K