Format Number

Logic Name

Format Number

Function

Outputs the input number in specified(DecimalFormat) format.

Data Types

Location Type
The first input handler Numeric
Logic output String
lightbulbRefer to "Logic Specifications" for details.

Properties

Category Property Description
Required Format Specify the numeral format of the output.
Comment Comment The comment will also be output to the specifications.It does not affect the conversion process.

Function Details

Format

Format is used in order to convert number to string with specified format.

Symbol Position Meaning
0 Numeric Number.
# Numeric Number.Number. Not shown in case of zero.
. Numeric Delimiter for digits of number or currency.
- Numeric Minus sign.
E Numeric Separates the mantissa and the exponent in scientific notation.No need to put quotation marks in prefixes or suffixes.No need to put quotation marks in prefixes or suffixes.
% Prefix or suffix Multiplies by 100 times and represent in percentage
Format Notation Example
Input value (number) Format Output value (string)
0.25 ###.0% 25.0%
12.34 # 12
1234 0.###E0 1.234E3

Rounding Error

The result is rounded to "the closest number" to the specified format.However, if the result is equidistant to both adjacent numbers, it is rounded to the even number.This rounding method minimize accumulated rounding error when applied repeatedly to a sequence of calculations.
It is not rounding off.Use logic "Rounding" to round off numbers.

Logic Sample

Mapping Definition

Logic Settings and Processing Result

Processes input data in the "##0.0%" format and outputs as a string.
Property Settings
Property Setting
Format ##0.0%
Input Data
0.25
1
0.0012
Result Data
25.0%
100.0%
0.1%