NumberFormat2

jp02

Member
Licensed User
Longtime User
Hello,
In numberformat2 function, it is possible to format the string with separators, could there be a possibility to choose a separator. In France the old method is to use the "." or space to thousands separator and the comma is reserved for the decimal part.
with the computer french keyboard another choice is to use space as thousands separator and "." as the start of the decimal part as with Excel.
Many thanks
Jean-Pierre
 

mc73

Well-Known Member
Licensed User
Longtime User
In Greece we use comma for decimals too. I process the number as string, replacing dot with comma.
 

Vader

Well-Known Member
Licensed User
Longtime User
EDIT: Take a look here:http://www.b4x.com/forum/additional...dates/7561-ahlocale-library-5.html#post145760

It sounds to me that we really just need to perform some kind of Regional formatting.

Something like:
Region.FormatNumber(123456.78)

If my Language is set to "English (Australia)", it would return 123,456.78
If English (France) [not that I know that is possible], it would return 123 456,78
If Greece, maybe something like 123,456,78 ?

Not that this is helpful, but maybe a Library could do it to start off with.

What does Java have?

Dave
 
Last edited:

corwin42

Expert
Licensed User
Longtime User
I have added a AHNumeric object to AHLocale library.

With this object it should be possible to format numbers using country dependend rules.

It is currently not possible to set individual decimal and grouping characters. If you really need this it can be added to the library, too.
 

jp02

Member
Licensed User
Longtime User
Thank You for the library, I will include it in my short translation for french users.

Best Regards:sign0098:
JP
 
Top