Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
Please try below.
Regards,
@Gohan - you need to use parseFloat(), valueOf() returns a Float (object) and parseFloat() returns float number.
Code -
Float.parseFloat(row1.field1)