Decimalformat - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

DecimalFormat

Description
Converts a number to a decimal-formatted string.
Returns
A number as a string formatted with two decimal places and a thousands separator.
Category
Display and formatting functions
Function syntax
DecimalFormat(number)
See also
DollarFormat,
Parameters
Parameter
number
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(Evaluate(counter * sqr(2)))#
</cfoutput>
<br>
</cfloop>
460
Chapter 3: ColdFusion Functions
NumberFormat
Description
Number to format

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents