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
parenthesis. 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 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.