Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
RVeitch_84
Creator
Creator

Convert a BigDecimal to Integer - tJavaRow

I need to convert a BigDec to Int:

Here is a sample of my source data as a BigDec via a tFileInputExcel

153227.49

and I would like to convert it into an INT using tJavaRow to show the following result

15322749

Let me know if you have any questions and thanks for any help.

~Bob

Labels (3)
1 Reply
Anonymous
Not applicable

Hi

Just remove the period from the source data? If so, try this expression to convert BigDecimal to integer type.

output_row.c1 = Integer.parseInt((input_row.c1.toString()).replaceAll("\\.",""));

 

 

 

Regards

Shong