sbornstein2
asked on
Formatting Number with a Comma for thousands
I have 51152 coming in from a recordset. How do I response.write that with a comma separator like 51,152?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You could also use FormatNumber(objRS("YourFi eld"),0) if you don't want any numbers after the decimal. The number after the comma specifies the number of digits after the decimal.
Here is more information:
http://www.w3schools.com/vbscript/func_formatnumber.asp
The link Fritz gave is a great reference as well...
bvinson
Here is more information:
http://www.w3schools.com/vbscript/func_formatnumber.asp
The link Fritz gave is a great reference as well...
bvinson
i agree with bvison
but i think you may need to set it out like this:
Response.write FormatNumber(objRS("YourFi eld"),0,0)
Apresto
but i think you may need to set it out like this:
Response.write FormatNumber(objRS("YourFi
Apresto
Its true...Fritz has the quicker fingers. I felt like I was racing him all afternoon in trying to respond to questions. :) He always entered his response while I was still typing mine.
bvinson
bvinson
>>He always entered his response while I was still typing mine.<<
It's callled COFFEE!!!
FtB
It's callled COFFEE!!!
FtB
lol - your right sorry ftb i think unintentianally hopped to the last comment posted
bvisons is right though, your like a machine ftb!!!
ftb - the Terminator...Ill Post Back!! :o)
bvisons is right though, your like a machine ftb!!!
ftb - the Terminator...Ill Post Back!! :o)
I am glad that formatNumber() worked for you. Did you not see my post then?
http://www.devguru.com/Technologies/vbscript/quickref/formatnumber.html
FtB