1

I am using locale Id(LCID) in classic ASP. I have currency in 7177 locale Id(South Africa). I want to convert it to the currency with locale id 3081(Australia). For example, if input is 13,10 then output should be 13.10.

I try this :

function getNumberStr(number)
    response.write("session.lcid" & session.lcid &"number:" & number & "</br>") 
    currentLCID = session.lcid

    session.lcid = 3081
    number = formatcurrency(number)
    str = Cstr(number)
    response.write("session.lcid" & session.lcid &"number:" & number & "str:" & str & "</br>") 
    session.lcid = currentLCID
    getNumberStr = str
end function

My initial locale Id is 7177 and I am calling this function like:

x = "10,10"
getNumberStr(x)

but i am not getting expected output.

4

1 回答 1

2

传递要格式化为数字的表达式:

x = CDbl("10,10")
getNumberStr(x)
于 2016-04-23T06:38:57.860 回答