Formats a string in U.S. Dollar format. For other currencies, use LSCurrencyFormat or LSEuroCurrencyFormat. The function will return a number as a string, formatted with two decimal places, thousands separator and dollar sign. If the number is negative, the return value is enclosed in parentheses. If number is an empty string, the function returns zero.

dollarFormat(number) → returns string

dollarFormat Argument Reference

number numeric

The number to format.



DollarFormat Rounding Bug CF-4199995 - Certain inputs do not cause dollarFormat to round up, for example 6.5850 results in $6.58, yet 6.585 results in $6.59. Consider using numberFormat as a workaround.


This bug mentioned for ACF also existed in Lucee 4.5, but seems to be fixed in Lucee 5.

Links more information about dollarFormat

Sample code invoking the dollarFormat function

Dollar Format is about $, commas, and 2 decimal places


Expected Result: $1,236,598.20

Negative numbers appear with parentheses. May cause issues due to LDEV-3743


Expected Result: ($11.34)

Fork me on GitHub