Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Datatype Conversion

Hello Talend Folks,
I am new to Talend and trying to accomplish some intermediate operations in TMAP Component. I need to convert the data types in TMAP to work through my tasks.
I need to convert from String - > Number ; String - > NVarchar2 ; String -> Timestamp ; String -> Date
Any help on the above is deeply appreciated.
Thanks
psreepa
Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi Psreepa
Welcome to Talend Community!
String->Number: String->Int
Integer.parseInt(s)
String->NVarchar2:
No need to change.
String->Timestamp and String->Date: String->Date
TalendDate.parseDate(pattern, stringDate)
Regards,
Pedro
Anonymous
Not applicable
Author

Thanks for your quick response, Pedro.
I am getting an error after using TalendDate.parseDate("dd-mmm-yy",row2.Column0) . Do I also need to pick the date pattern? Source record is lik 2012-01-31 and my end result should look like 31-JAN-12.
Thx
Psreepa
Anonymous
Not applicable
Author

Hi
You can change date pattern in tMap as the following image.
Regards,
Pedro