|
-
May 8th, 2001, 04:07 PM
#1
Thread Starter
Hyperactive Member
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
-
May 9th, 2001, 01:16 AM
#2
Thread Starter
Hyperactive Member
Come on....
....please help with this one!!
-
May 9th, 2001, 12:59 PM
#3
Frenzied Member
I think you can use the VBScript FormatCurrency() function...
Syntax
FormatCurrency(Expression[,NumDigitsAfterDecimal [,IncludeLeadingDigit [,UseParensForNegativeNumbers [,GroupDigits]]]])
Check out this page on MSDN
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
May 9th, 2001, 02:38 PM
#4
Thread Starter
Hyperactive Member
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
-
May 9th, 2001, 02:44 PM
#5
Thread Starter
Hyperactive Member
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
-
May 9th, 2001, 03:12 PM
#6
Thread Starter
Hyperactive Member
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
-
May 9th, 2001, 04:12 PM
#7
Frenzied Member
The currency symbol used should be determined by the Regional Settings on the server...
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|