-
Formatting fields.....
Hello,
I am reading a record from a SQL DB which has the datatype set to "money". In my webpage (ASP) I now want to display this "money record" just read in the format 999,999,999.99.
How can I do this??
By just doing a response.write var it DOES show me the right value, but in the format 999999999 - also excluding the decimal!!
Any help or suggestions please.
Thanks,
T
-
Come on....
....please help with this one!!
-
I think you can use the VBScript FormatCurrency() function...
Syntax
FormatCurrency(Expression[,NumDigitsAfterDecimal [,IncludeLeadingDigit [,UseParensForNegativeNumbers [,GroupDigits]]]])
Check out this page on MSDN
-
Hi Monte96,
It works great except for one thing. The default currency symbol is $, and I would need to use something else!! Do you perhaps know how to change this?? I'll go look on MSDN too.
Another thing is that I need to separate 1000's with a "," - eg 500,000.00.
Thanks for your help,
T
-
MSDN helps!! I got the answer on my question about seperating 1000's with ",", but I cannot see how to change the currency symbol.
ANY help or ideas please!!
T
-
Got it...
Instead of using formatcurrency, I just use formatnumber in the same way. I then lose the currency sign, but thats ok.
Thanks,
T:D
-
The currency symbol used should be determined by the Regional Settings on the server...