Block Group: | Number Formatting |
Icon: |
Returns a number or string based on defined formatting criteria.
If the input value's number of decimal places is greater than that of the specified format, the Format Number block rounds the value.
If format is null, the default formatting is returned. This default formatting includes a thousands separator and all decimal places.
For information on using dataflow blocks, see Dataflow.
For accepted and excluded arguments of Number Formatting blocks, see Number Formatting.
The following properties of the Format Number block can take input and give output.
input specifies the number to format.
format specifies a combination of number format patterns to use. For example, you can format the value to be displayed as "1,050.40" with this format string: "#,###.00".
The following property of the Format Number block can give output but cannot take input.
output returns the number or formatted string.
The following image shows two examples of the Format Number block. The topmost Format Number block formats a decimal value so that the value appears as a percentage with a label. The bottommost Format Number block rounds a number to the tenths place and includes a comma for a thousands separator.