Skip to main content
Inspiring
March 11, 2009
Answered

number format

  • March 11, 2009
  • 2 replies
  • 711 views
My query returns two numbers like 123450 and 58678. I want the numbers to display like this 123,450 and 58,678.

Any ideas - thanks
jim
    This topic has been closed for replies.
    Correct answer Kronin555
    #NumberFormat(estcost , "___,___,___")#

    The second parameter is expecting a string. You need to surround it with quotes.

    Edit: The documentation is always helpful, and always has examples you can look at for reference.
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_08.html#134113

    2 replies

    Kronin555Correct answer
    Participating Frequently
    March 11, 2009
    #NumberFormat(estcost , "___,___,___")#

    The second parameter is expecting a string. You need to surround it with quotes.

    Edit: The documentation is always helpful, and always has examples you can look at for reference.
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_08.html#134113
    rockhikerAuthor
    Inspiring
    March 19, 2009
    Thank you that did the trick. been out sick (thats why it took so long). thks jim
    Inspiring
    March 11, 2009
    rockhiker wrote:
    > My query returns two numbers like 123450 and 58678. I want the numbers to display like this 123,450 and 58,678.
    >
    > Any ideas - thanks
    > jim

    numberformat(123450)
    numberformat(58678)

    So why did you have to ask, the answer was in your title?

    rockhikerAuthor
    Inspiring
    March 11, 2009
    I have tried using the numberFormat with no luck?

    #NumberFormat(estcost , ___,___,___)#