setlocale

Discussion in 'ASP General' started by Kevin Humphreys, Mar 14, 2005.

  1. Hi There,
    I have a problem when doing a arithmetic calculation on 2 values with the
    Polish Regional settings on Windows 2000.

    So in the code I have
    TotalValue = ((Txt_Qty.value) * (Txt_Price.value))
    Txt_ExtendedPricePerLine.value = TotalValue

    So if the above is calculated with the following 2 values Txt_Qty.value =
    56, Txt_Price.value = 52.45 then Txt_ExtendedPricePerLine.value gets a value
    of 2937,2

    How can I get this changed to 2937.2?

    I used setLocale("en-gb") but this does not work.

    Your help is much appreciated.

    Kevin.
     
    Kevin Humphreys, Mar 14, 2005
    #1
    1. Advertising

  2. Kevin Humphreys

    Evertjan. Guest

    Kevin Humphreys wrote on 14 mrt 2005 in
    microsoft.public.inetserver.asp.general:

    > Hi There,
    > I have a problem when doing a arithmetic calculation on 2 values with
    > the Polish Regional settings on Windows 2000.
    >
    > So in the code I have
    > TotalValue = ((Txt_Qty.value) * (Txt_Price.value))
    > Txt_ExtendedPricePerLine.value = TotalValue
    >
    > So if the above is calculated with the following 2 values
    > Txt_Qty.value = 56, Txt_Price.value = 52.45 then
    > Txt_ExtendedPricePerLine.value gets a value of 2937,2
    >
    > How can I get this changed to 2937.2?


    What is this .value business?
    We are talking serverside ASP vbscript?


    response.write replace(price,",",".")

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
     
    Evertjan., Mar 14, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. klikic

    JSTL fmt:setLocale problem

    klikic, Apr 28, 2006, in forum: Java
    Replies:
    0
    Views:
    4,731
    klikic
    Apr 28, 2006
  2. Mathieu Malaterre

    strtod / setlocale

    Mathieu Malaterre, Dec 13, 2004, in forum: C++
    Replies:
    1
    Views:
    578
    Buster
    Dec 13, 2004
  3. transam

    setlocale returns error

    transam, Jun 12, 2004, in forum: Python
    Replies:
    3
    Views:
    2,401
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Jun 13, 2004
  4. Ksenia Marasanova

    locale.setlocale problems

    Ksenia Marasanova, Oct 2, 2004, in forum: Python
    Replies:
    3
    Views:
    5,235
    Guest
    Oct 3, 2004
  5. Damien Elmes
    Replies:
    3
    Views:
    564
    Damien Elmes
    Aug 24, 2005
Loading...

Share This Page