-
$ 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.
-
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
-
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?
-
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