Android Question NumberFormat, is this an bug?

Filippo

Expert
Licensed User
Longtime User
Hi,

is this an bug, or am I doing something wrong?

B4X:
    Dim dNum As Double = 1.8
    Log("NumberFormat= " & NumberFormat(dNum * 1000, 0, 0))
    Log("NumberFormat2= " & NumberFormat2(dNum * 1000, 0, 0, 0, False))

NumberFormat= 1,800
NumberFormat2= 1800
 

Daestrum

Expert
Licensed User
Longtime User
Are you referring to the comma in the first numberformat?

The comma is a thousands separator in some locales (UK for example) but I understand some use comma as the decimal point so it could look wrong.
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
Change the NuberFormat2 Boolean parameter (Grouping Used) to 'True' and the result will be the same.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Yes, that's exactly my case.
Try
You can define the grouping char here.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…