Hello, I would like to convert the following string : 2016 Apr 12 05:30:35 into date to import it into a tOracleOutput from a tMap in the following format : 12/04/2016 05:30:35 but I encounter the error Type mismatch cannot convert from string to date. I tried different ways : expression with TalendDate.parseDate, date pattern Any help would be nice
Hi Thanks for your reply, I did it. So what I did is : In expression filter on the right panel of the tMap I replaced row3.TIMESTAMP by TalendDate.parseDate("yyyy MMM dd HH:mm:ss",row3.TIMESTAMP) AND on the table below I set the date pattern I would like to have : "dd/MM/yyyy HH:mm:ss" That's all
Hi, Have you tried to use the built-in function TalendDate.parseDateLocale() to convert the string(text) data to a Date? The expression should be:TalendDate.parseDateLocale("yyyy MMM dd HH:mm:ss",row3.TIMESTAMP ,"EN") Best regards Sabrina
-- Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Another strange idea Try to rearrange your Fields from the input schema. It sound ridiculous But i had some Job's here with an Date Problem or an Lookup one which i only rearrange the the Fields from the input schema. In this point Talend is a little bit buggy regards john