Easy Tutorial
❮ El For Each El Otherwise ❯

XSLT format-number() Function



Definition and Usage

The format-number() function is used to convert a number into a string.


Syntax

Parameters

Parameter Description
number Required. Specifies the number to be formatted.
format Required. Specifies the formatting pattern. These characters are used in the formatting pattern: 0 (digit)<br> # (digit, zero is shown as absent)<br> . (position of the decimal point. For example: ###.##)<br> , (thousands separator. For example: ###,###.##)<br> % (displays the number as a percentage. For example: ##%)<br> ; (pattern separator. The first pattern is used for positive numbers, the second for negative numbers)
decimalformat Optional.

Example 1

View XSL File, View Result.

❮ El For Each El Otherwise ❯