# DecimalFormat

Returns number as a string formatted with two decimal places and thousands separator.

See also DollarFormat and NumberFormat.

### Syntax

    DecimalFormat(number)

##### number

Number being formatted.

### Examples

    <!--- This code shows the use of DecimalFormat --->
    <HTML>
    <HEAD>
    <TITLE>
    DecimalFormat Example
    </TITLE>
    </HEAD>

    <BODY BGCOLOR=silver>
    <H3>DecimalFormat Function</H3>

    <P>Returns a number to two decimal places.
    <P>
    <CFLOOP FROM=1 TO=20 INDEX="counter">
    <CFOUTPUT>
    #counter# * Square Root of 2: #DecimalFormat(Evaluate(counter * sqr(2)))#
    </CFOUTPUT>
    <BR>
    </CFLOOP>

    </BODY>
    </HTML>