Thank you guys,
it worked...and finally we managed with the below on.
(CASE WHEN CHAR_LENGTH(CREATED) = 9
THEN
cast(cast(substr(cast(CREATED as char(9)),1,7)||'20'||substr(cast(CREATED as char(9)),8,11) as date format 'dd-mmm-yyyy') as date format 'YYYY-MM-DD')
ELSE
cast(cast(substr(cast('0'||CREATED as char(9)),1,7)||'20'||substr(cast('0'||CREATED as char(9)),8,11) as date format 'dd-mmm-yyyy') as date format 'YYYY-MM-DD') END ) as CREATED
↧