Is it possible to force any numerical value exported from an xmlport to a certain custom format, regardless of regional settings? For example, 120.25 (US) will export as 120,25?
Asked
Active
Viewed 1,555 times
1
-
https://msdn.microsoft.com/en-us/library/dd301059.aspx – Ivan Barayev Jan 12 '17 at 02:14
1 Answers
1
You can do it using CONVERTSTR DELCHR and FORMAT
functions and assing the result a text
variable.
EXAMPLE:
strNumber Txt (30)
TSeparator Text Constants '
strNumber := CONVERTSTR(DELCHR(FORMAT(ROUND("Your Number", 0.01), 0,
'<Precision,2:2><integer><decimals>'), TSeparator,'') ,'.',',');
TSeparator
Text Constant is the thousand separator in your example do not need because 125 is < 1000 but you need set your thousand separator in this variable for bigger numbers.

Jonathan Bravetti
- 2,228
- 2
- 15
- 29