Solved

FormatCurrency

Posted on 2001-06-29
7
561 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

809 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