[resolved] How to convert float to integer in tMap ?

One Star

[resolved] How to convert float to integer in tMap ?

Hello
How to convert float (AS400) column to integer (Postgres) column in tMap ?
I tried several methods without success :-(
Thanks

Accepted Solutions
Seventeen Stars

Re: [resolved] How to convert float to integer in tMap ?

hi,
have a look at :
 http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
It give you the method in java 
ps : you can also do something like 'java String to integer' in google Smiley Wink  or look for similar post in Talend forum with the option Search ....
regards
laurent

All Replies
Community Manager

Re: [resolved] How to convert float to integer in tMap ?

Hello
try
(int)row1.columnName

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] How to convert float to integer in tMap ?

thanks a lot Shong, it works !
I don't understand why i haven't try this before...
Two Stars

Re: [resolved] How to convert float to integer in tMap ?

how to convert string 0.15 into integer?
thanks and regards
Syed

Re: [resolved] How to convert float to integer in tMap ?

Integer.parseInt(yourstring);
Seventeen Stars

Re: [resolved] How to convert float to integer in tMap ?

hi,
have a look at :
 http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
It give you the method in java 
ps : you can also do something like 'java String to integer' in google Smiley Wink  or look for similar post in Talend forum with the option Search ....
regards
laurent