decimalFormat
Description
Converts a number to a decimal-formatted string.
Categories
Related
Syntax
DecimalFormat(number)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| number | Number to format |
Returns
A number as
a string formatted with two decimal places and a thousands separator.
Example
<h3>DecimalFormat Function</h3>
Returns a number to two decimal places.
<cfloop FROM = 1 TO = 20 INDEX = "counter">
<cfoutput>
#counter# * Square Root of 2:
#DecimalFormat(counter * sqr(2))#
</cfoutput>
<br>
</cfloop>