Name
DollarFormat
Synopsis
DollarFormat(number
)
Returns number
as a string formatted to
two decimal places with a dollar sign and thousands separators. If
number
is negative, it is returned in
parentheses. Examples:
<cfoutput> -1000: #DollarFormat(-1000)#<br> -100: #DollarFormat(-100)#<br> -10: #DollarFormat(-10)#<br> -1: #DollarFormat(-1)#<br> 1: #DollarFormat(1)#<br> 10: #DollarFormat(10)#<br> 100: #DollarFormat(100)#<br> 1000: #DollarFormat(1000)#<br> 10000: #DollarFormat(10000)#<br> 100000: #DollarFormat(100000)#<br> 1000000: #DollarFormat(1000000)#<br> </cfoutput>
Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.