I am trying to convert a string ( 1223.00) to float in tmap, but it's giving me an error "Error converting datatype nvarchar to float.
I tried the following :
Float.valueOf(row1.field1), still it won't run.
I also tried
row1.field1!= null ? row1.field1.doubleValue() : null
It says "the method doubleValue is undefined for the type String.
Can someone help me with this?
@Gohan - you need to use parseFloat(), valueOf() returns a Float (object) and parseFloat() returns float number.
Watch the recorded webinar!
Introduction to Talend Open Studio for Data Integration.
Test drive Talend's enterprise products.
Practical steps to developing your data integration strategy.