B4J Question Convert String to Integer or Float

@derez , thank you now it work. But i got too much string character. Ex "9.635287829495450" I want it to trim it to be "9.63" so How can I do?
 
Upvote 0
This will give you the rounded value which is 9.64
Code: Copy
Dim st As String = "9.635287829495450"
Dim F As Float = st
F = NumberFormat(F,1,2)
If you want just to cut, use
Code: Copy
F = Floor(F*100)/100
instead of NumberFormat.
 
Upvote 0
Back
Top