G-ShadoW Active Member Licensed User Longtime User May 12, 2015 #1 Hello, how to remove all numbers after . (dot) decimal numbers 234.32165735436 12.685633468587979 etc so that I get clean number 234 12
Hello, how to remove all numbers after . (dot) decimal numbers 234.32165735436 12.685633468587979 etc so that I get clean number 234 12
G-ShadoW Active Member Licensed User Longtime User May 12, 2015 #2 ok, I got it NumberFormat2 Upvote 0
JTmartins Active Member Licensed User Longtime User May 12, 2015 #3 You have other options depending on the situation. One is taking advantage of B4A cast example B4X: Private a As Float Private b As Int a=12.233233 b=a in the above situation b will hold the integer part of a The other is using the keyword Floor Example B4X: Private X As Float X=12.233233 X= (Floor(X)) Log (X) In the end X will hold the integer part of the initial X value and of course you also have the numberformat2 option. Upvote 0
You have other options depending on the situation. One is taking advantage of B4A cast example B4X: Private a As Float Private b As Int a=12.233233 b=a in the above situation b will hold the integer part of a The other is using the keyword Floor Example B4X: Private X As Float X=12.233233 X= (Floor(X)) Log (X) In the end X will hold the integer part of the initial X value and of course you also have the numberformat2 option.