Results 1 to 4 of 4

Thread: $ signs

  1. #1

    Thread Starter
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670

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

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    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!

  3. #3

    Thread Starter
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    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."

  4. #4
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    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
  •  



Click Here to Expand Forum to Full Width