Skip to Content
0
Former Member
Dec 04, 2007 at 09:31 PM

UDF: How to convert string with sign into integer

489 Views

Hi

I have a number e.g 123456 (xsd:string) and sign - or + (xsd:string) and both are concatenated and fed into UDF. I want this string to be converted into Integer. If I use the below kind of statement it is not working and throwing the below error.

int BilledAmount = Integer.parseInt(b[0]);

Exception:

RuntimeException in Message-Mapping transformation: Exception:[java.lang.NumberFormatException: For input string: "+000000000006684"]

Any guess on this issue ??

Regards

Kumar