Solved

FormatCurrency

Posted on 2001-06-29
7
562 Views
Last Modified: 2007-12-19
I am running a site on 2 different servers.  One is Windows 2000 Server and the other is Windows 2000 Advanced Server. I have the currency set to Sterling Pounds # in Control Panel, Regional Options but both show Dollars $ when I use FormatCurrency.

Any ideas guys?

Cheers

Dave
0
Comment
Question by:daveamour
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 9

Expert Comment

by:TTom
ID: 6239370
Hmmm.  I wonder.  Is this being done on the server side or on the client side?  When I did this, I could make the results change, depending upon where the writing was being done.

Tom
0
 
LVL 19

Author Comment

by:daveamour
ID: 6239389
The writing is being done on the server using the VBScript FormatCurrency Function so its not a client side issue.  Besides I have tried this clientside in the UK and in Canada.

Cheers

Dave
0
 
LVL 9

Expert Comment

by:TTom
ID: 6239486
FWIW, I thought that might be the case, but I figured I would toss it out.

Have you tried the parameters of the FormatCurrency Function?  When I did this, I used

response.write FormatCurrency(1000,2,-2,-2,-2)

(I think the last parameter is "use regional settings", but I may be wrong.)

If I set my Regional Currency Symbol to something other than $, it worked just fine.  However, if I used client side script, the same page wrote differently on different machines.

Good luck!

Tom

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Expert Comment

by:weesiong
ID: 6240184
daveamour,

Using LCID()

original = SetLocale("de")
myvalue = CCur(GermanNumber.value)
original = SetLocale("en-gb")
USNumber.value = FormatCurrency(myvalue)

Regards,
Wee Siong
0
 
LVL 1

Accepted Solution

by:
rxolotl earned 25 total points
ID: 6244952
I think that you can make something like
fNum = FormatNumber(yourNum, 2)
fNum= "$" + fNum
0
 
LVL 19

Author Comment

by:daveamour
ID: 6250085
This seems to be the best workaround, couldn't get any of the others to work.

Thanks everyone

Dave
0
 
LVL 1

Expert Comment

by:rxolotl
ID: 6250357
Thanks =D
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Html form and modal / img src -problem 3 45
ASP AND XML 3 30
VB script help 23 35
ASP Error Handler 5 21
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question