Almora Well-Known Member Licensed User Longtime User Apr 8, 2023 #1 1.542.500 >>> 1542.500 How can I convert this number to this shape? I want to convert it into actionable. thanks..
1.542.500 >>> 1542.500 How can I convert this number to this shape? I want to convert it into actionable. thanks..
M Mahares Expert Licensed User Longtime User Apr 8, 2023 #2 Here are two ways, but there are others: B4X: Dim s As String ="1.542.500" Dim d As String = NumberFormat2(s.Replace(".","")/1000,1,3,3,False) Log(d) B4X: Dim s As String ="1.542.500" Dim sarray() As String = Regex.Split("\.", s) Log($"${sarray(0)}${sarray(1)}.${sarray(2)}"$) There are other ways like regex and B4XFormatter Upvote 1
Here are two ways, but there are others: B4X: Dim s As String ="1.542.500" Dim d As String = NumberFormat2(s.Replace(".","")/1000,1,3,3,False) Log(d) B4X: Dim s As String ="1.542.500" Dim sarray() As String = Regex.Split("\.", s) Log($"${sarray(0)}${sarray(1)}.${sarray(2)}"$) There are other ways like regex and B4XFormatter