Angelo Maradini Member Licensed User Longtime User Jan 17, 2020 #1 With the latest version of B4i (or latest version of iOs) the answer of NumberFormat has changed in the case of a number rounded to 0 NumberFormat(0.001, 0, 2) = "" Why the function NumberFormat does not return "0.00" but "" ?
With the latest version of B4i (or latest version of iOs) the answer of NumberFormat has changed in the case of a number rounded to 0 NumberFormat(0.001, 0, 2) = "" Why the function NumberFormat does not return "0.00" but "" ?
ilan Expert Licensed User Longtime User Jan 17, 2020 #2 try this: B4X: Copy Log("The rounded number is: " & NumberFormat2(0.001, 1, 2,2, False)) The rounded number is: 0.00 Click to expand...
try this: B4X: Copy Log("The rounded number is: " & NumberFormat2(0.001, 1, 2,2, False)) The rounded number is: 0.00 Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Jan 19, 2020 #3 You are setting the minimum number of integers to 0 and the maximum number of decimal digits to 2. As Ilan wrote you should use NumberFormat2 in this case as you want to set the minimum number of decimal digits.
You are setting the minimum number of integers to 0 and the maximum number of decimal digits to 2. As Ilan wrote you should use NumberFormat2 in this case as you want to set the minimum number of decimal digits.
Angelo Maradini Member Licensed User Longtime User Jan 19, 2020 #4 Erel said: You are setting the minimum number of integers to 0 and the maximum number of decimal digits to 2. As Ilan wrote you should use NumberFormat2 in this case as you want to set the minimum number of decimal digits. Click to expand... Thanks Erel
Erel said: You are setting the minimum number of integers to 0 and the maximum number of decimal digits to 2. As Ilan wrote you should use NumberFormat2 in this case as you want to set the minimum number of decimal digits. Click to expand... Thanks Erel