====== FormatNumber ====== The //FormatNumber()// function can be used to convert numeric values into country-specific formats. \\ \\ The following link describes the formatting: \\ [[https://msdn.microsoft.com/de-de/library/0c899ak8(v=vs.110).aspx|https://msdn.microsoft.com/de-de/library/0c899ak8(v=vs.110).aspx]] {{:images:sign_warning.png?nolink|}}**Note:** FormatNumber() only makes sense if the target element is of type string! When containerizing according to EDIFACT, NullableNumeric data elements are defined with a '.' as a decimal separator. ==== Syntax: ==== FormatNumber('Numeric value', 'Formatting', ['Decimal separator or country code'], ['Thousands separator'], ['Default value if the num. Value is empty']) ==== Sample: ==== ^Code^Result^ |FormatNumber('2,343.9353', '#,##0.00')| 2,343.94| |FormatNumber('2,343.9353', '#,##0.00', 'de-DE')| 2.343,94| |FormatNumber('2,343.9353', '#,##0.00', 'fr-FR')| 2 343,94| |FormatNumber('2,343.9353', '0.00')| 2343.94| |FormatNumber('2,343.9353', '0.00', 'de-DE')| 2343,94| |FormatNumber('2,343.9353', '0.00', 'fr-FR')| 2343,94| |FormatNumber('10000','#,###.00')| 10,000.00| |FormatNumber('10000','#,###.#')| 10,000| |FormatNumber('1.23','#,###.#')| 1.2| |FormatNumber(2343.9353, '#,##0.00')| 2,343.94 | |FormatNumber('2.343,9353', '#,##0.00')| 2,343.94 | |FormatNumber('2.343,9353', '#,##0.00', '.')| 2343.94 | |FormatNumber('1.23','0,000.00') | 0,001.23| |FormatNumber('1235.6','#,###.#',',') | 1235,6| |FormatNumber('1235.6','#,###.00',',') | 1235,60 | |FormatNumber('2.343,9353', '#,##0.00', ',')| 2343,94| |FormatNumber('2,343.9353', '#,##0.00', ',', '.')| 2.343,94| |FormatNumber('2,343.9353', '#,##0.00', 'x', ':', '0')| 2:343x94| |FormatNumber('343,9323', '#,##0.00', ',', '.', '0')| 343,93| |FormatNumber('2,343.9', '#,##0.00', %%','%%, %%''%%)| 2343,90| |FormatNumber(%%''%%, '#,##0.00', ',', '.', '0')| 0.00| |FormatNumber(-12.132, '0.00;0.00-;ZERO')| 12.13-| |FormatNumber(22.9, '0.00;0.00-;ZERO')| 22.90| |FormatNumber(0, '0.00;0.00-;ZERO')| ZERO| |FormatNumber(%%''%%, '#,##0.00', ',', '.') | Emtpy | |FormatNumber('-12.132', '#,##0.00+;#,##0.00-', "" , "")|1213**-**((BTE Format))| |FormatNumber('12.132', '#,##0.00+;#,##0.00-', "" , "")|1213**+**((BTE Format))| |FormatNumber('2,343.9353', '#,##0.00', %%''%%, %%''%%)| **234394**| {{:images:sign_warning.png?nolink|}}**Note:** FormatNumber('1235.6','#,###.00',%%''%%, %%''%%) will result in **123560 **((This is not supported by FormatNumberEx.))