1

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?

Jonathan Bravetti
  • 2,228
  • 2
  • 15
  • 29
WSNoob
  • 33
  • 8

1 Answers1

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