Whatever message this page gives is out now! Go check it out!

DecimalFormat

Last update:
May 18, 2026

Description

Converts a number to a decimal-formatted string.

Returns

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

Category

Function syntax

DecimalFormat(number)

See also

Parameters

Parameter
Description
number
Number to format

Example

<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(counter * sqr(2))# 
</cfoutput> 
<br> 
</cfloop>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page