Format Number

This data converter reformats a number. The input text must be a number in the standard number format, e.g. "12378.64".

Note: If a number should be converted to the standard number format, use the Extract Number data converter.

Properties

The Format Number data converter is configured using the following properties:

Format Pattern

Contains a pattern that specifies the format of the number. Use one of the default patterns, or see below for details about specifying a pattern.

Decimal Separator

Contains the decimal separator to use in the number, i.e. the separator between the integer and fraction part of the number, for example '.' or ','.

Thousands Separator

Contains the thousands separator to use in the number, i.e. the separator between groups of thousands in the integer part of the number, for example ',' or a space.

Minus Sign

Contains the character to use as minus sign in the number, typically '-'.

Description

Type in a description to be shown in the list of data converters. If there is no type in a description, one will be generated.

Specifying a format pattern

The format pattern provides a very flexible way of specifying the number format. However, the rules for specifying the pattern can be somewhat difficult to understand, so simply find the default pattern that matches the required format best, and then experiment with changing that default pattern.

In a pattern, the following special characters can be used:

Special Character

Description

0

A digit.

#

A digit, but zero is not shown.

.

The decimal separator, i.e. the character specified in the Decimal Separator field.

,

The thousands separator, i.e. the character specified in the Thousands Separator field.

-

The minus sign, i.e. the character specified in the Minus Sign field.

E

In scientific notation, separates the mantissa and the exponent.

Note In the pattern, the '.' character is always used to select the decimal separator, regardless of what have been entered in the Decimal Separator field. The '.' character will then be replaced by the character in the Decimal Separator field when the number is formatted. The same applies to the thousands separator and minus sign.

Separate patterns can be specified for positive and negative numbers. This is done by specifying two patterns separated by semicolon (';'). For example, the pattern "#,##0.00;(#,##0.00)" can be used if negative numbers should be parenthesized instead of the default where the minus sign character is placed in front of negative numbers.