Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
stephbzr
Contributor III
Contributor III

Convert a string number to an integer number temporarily

Hello,

I've already tried this formula which works very well to perform a calculation where the numbers are originally in string, float temporarily, then back to string. 

 

String.valueOf(Float.valueOf(data_1) + Float.valueOf(data_2))

 

But I can't find an alternative (or it's the formula that doesn't work) for a string originally, integer temporarily to increase a counter, then string again. I tried these two methods, but they don't work :

 

String.valueOf(Integer.valueOf(data_1++))

String.valueOf(Integer.parseInt(data_1++))

 

Do you have an idea ?

Labels (5)
1 Reply
coolguru
Contributor
Contributor

Try:

String.valueOf(Integer.parseInt(data_1) + 1)

String.valueOf(Integer.valueOf(data_1) + 1)