Filippo Expert Licensed User Longtime User Sep 21, 2024 #1 Hi, is this an bug, or am I doing something wrong? B4X: Copy 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 Click to expand...
Hi, is this an bug, or am I doing something wrong? B4X: Copy 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 Click to expand...
DonManfred Expert Licensed User Longtime User Sep 21, 2024 #2 Filippo said: or am I doing something wrong? Click to expand... We do not know what values you expected. Upvote 0
Filippo said: or am I doing something wrong? Click to expand... We do not know what values you expected.
Daestrum Expert Licensed User Longtime User Sep 21, 2024 #3 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
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.
mangojack Expert Licensed User Longtime User Sep 21, 2024 #4 Change the NuberFormat2 Boolean parameter (Grouping Used) to 'True' and the result will be the same. Upvote 0
Filippo Expert Licensed User Longtime User Sep 21, 2024 #5 Daestrum said: 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. Click to expand... Yes, that's exactly my case. Upvote 0
Daestrum said: 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. Click to expand... Yes, that's exactly my case.
Filippo Expert Licensed User Longtime User Sep 21, 2024 #6 mangojack said: Change the NuberFormat2 Boolean parameter (Grouping Used) to 'True' and the result will be the same. Click to expand... Yes, you're right, I hadn't noticed that until now. Upvote 0
mangojack said: Change the NuberFormat2 Boolean parameter (Grouping Used) to 'True' and the result will be the same. Click to expand... Yes, you're right, I hadn't noticed that until now.
DonManfred Expert Licensed User Longtime User Sep 21, 2024 #7 Filippo said: Yes, that's exactly my case. Click to expand... Try [B4X] B4XFormatter - Advanced number formatter B4XFormatter is an alternative to NumberFormat / NumberFormat2 keywords. It is implemented in B4X and it is cross platform. There are two types in the library: B4XFormatter - The main class. B4XFormatData - A type with various configurable fields. The formatter holds a list of format data... www.b4x.com You can define the grouping char here. Upvote 0
Filippo said: Yes, that's exactly my case. Click to expand... Try [B4X] B4XFormatter - Advanced number formatter B4XFormatter is an alternative to NumberFormat / NumberFormat2 keywords. It is implemented in B4X and it is cross platform. There are two types in the library: B4XFormatter - The main class. B4XFormatData - A type with various configurable fields. The formatter holds a list of format data... www.b4x.com You can define the grouping char here.