How to change commas and decimal points in numbers?

vecino

Well-Known Member
Licensed User
Longtime User
Hello, currently NumberFormat2( fValor, 0,2,2, True) returns, eg 1,234.15
And I need to return: 1.234,15
How I can get it?
Thanks and regards
 

klaus

Expert
Licensed User
Longtime User
B4X:
Dim sValor As String
sValor = NumberFormat2( fValor, 0,2,2, True) returns, eg 1,234.15
sValor = sValor.Replace(",", "*")  ' replaces , by *
sValor = sValor.Replace(".", ",")  ' replaces . by ,
sValor = sValor.Replace("*", ".")  ' replaces * by .
Best regards.
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
Thanks, I'll do that.
Although I thought numberformat2 accept any parameters to do so.
No problem, I'll use the traditional method :)

Thanks
 
Upvote 0
Top