|
-
Jul 9th, 2001, 06:51 AM
#1
Thread Starter
Frenzied Member
$ signs
Hello all. I'm reasonably new to ASP so be gentle with me.
I am trying to display an amount in pounds sterling; eg
£100.00
I have a MONEY field in a SQL Server database, but whenever I try and display it in ASP I get it in dollars;
$100.00
I have been using the FormatCurrency function - is there a better way. I have checked both the server and the client PC for regional settings, and they are both set to £ signs. Are there some other settings in IIS that determine the currency symbol etc..?
Please help - this is driving me mad.
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
-
Jul 9th, 2001, 07:19 AM
#2
Fanatic Member
Hi Buzby
According to SQL books Online, you need to pas the currency sign in as well and then it will return ti in the same currency.
Hope this helps
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jul 9th, 2001, 09:08 AM
#3
Thread Starter
Frenzied Member
So... where would I put the £ sign in this example;
Response.Write "<TD ALIGN=CENTER>"+cstr(formatcurrency(Gridrs("calcamount")))+"</TD>" & vbNewLine
??
I've tried;
Response.Write "<TD ALIGN=CENTER>"+cstr(formatcurrency("£"+Gridrs("calcamount")))+"</TD>" & vbNewLine
but I just get a Type Mismatch error. Why can't ASP have VB's Format function - then I could just do
Response.Write "<TD ALIGN=CENTER>"+cstr(format(Gridrs("calcamount"),"Currency"))+"</TD>" & vbNewLine
And, also on the same subject I can't get it to display a Date in English (dd/mm/yyyy) format - again this is regardless to what is set in the regional settings in the Control Panel.
I'm using;
Response.Write "<TD ALIGN=CENTER>"+cstr(formatdatetime( Gridrs("paydate"),2))+"</TD>" & vbNewLine
where the '2' is meant to output the date in the Windows 'Short' format - which is set on the client and the server as dd/MM/yyyy
Any ideas?
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
-
Jul 9th, 2001, 10:07 AM
#4
Fanatic Member
From what I said, you are looking at it from the wrong side. The pund sign has to be in the SQL field that your grabbing the data from 
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
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
|