You need to format a number as a US currency for output.

The dollarFormat() function takes a number as its single parameter, and returns a formatted String. The following formatting is added to the string: two decimal places, thousandths separator, and a dollar sign. Furthermore, if the number is negative, it will be wrapped in parentheses.

<cfset testNum = -537>

This question was written by Jeremy Petersen
It was last updated on January 9, 2006.




comments powered by Disqus