Returns number as a string formatted with two decimal places and a thousands separator.
Display and formatting functions
DecimalFormat(number)
| Parameter |
Description |
|---|---|
| number |
Number to format |
<!--- 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>
LiveDocs comments are not longer enabled for ColdFusion 5.0. Please use one of the following resources instead.
ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 5.0