convert string to date in ODI
899509Nov 10 2011 — edited Sep 24 2012Hi everybody,
I'm developing a data integration project and I can't make my interface work. An error occurs when loading a date from the source flat file to the target table.
I'm using a csv file as data source and an Oracle database as target.
The DATE field (datastamp) inside the flat file (alias ssm) is actually read as a STRING (if I try to force the data type as DATE when reverse-engineering the flat file I'll not be able to retrieve the data from the file anymore) in the format 'YYYYMMDDHH24MISS' (es.20111027112634).
I need to map this date inside a target column with DATA TYPE = DATE but I don't know how to convert this string in a date. I haven't found anything like this in other posts and I'm a beginner with ODI.
I tried to use:
to_date(ssm.datastamp,'YYYYMMDDHH24MISS')
and i wrote it in the implementation tab when mapping the target column but it doesn't work.
How can i convert my string in a date and then load it in the target column?
Thank you very much in advance for your help.
Regards