Decimal comma (instead of point)

KMatle

Expert
Licensed User
Longtime User
Hi guys,

there is an old thread about it (Erel asked to open a new one). So here it is:

What is the best practice handling decimal numbers in a view? As known parts of Europe use a comma for decimal numbers and not a point.
 

rboeck

Well-Known Member
Licensed User
Longtime User
This problem we have in the most programming languages; i use a function which also handles thousand separators.

Sub dFormat(Iformat)

Dim dForm As String
Iformat=Iformat.Replace(",","P")
Iformat=Iformat.Replace(".","K")
Iformat=Iformat.Replace("K",",")
Iformat=Iformat.Replace("P",".")

dForm=Iformat

Return dForm
End Sub

In use it is like this:
dFormat(NumberFormat2(HaErtragt,1,0,0,True))

I hope, it helps.
Greetings
Reinhard
 
Upvote 0
Top