?
Solved

format currency

Posted on 2003-03-06
7
Medium Priority
?
1,823 Views
Last Modified: 2008-03-10
how to set the money currency without the dollar sign($) beside it, the asp command 'formatcurrency(number)' will have the dollar sign attach with the number.
Is it need to code this function buy ourself?
Thanks..
0
Comment
Question by:lico
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 9

Accepted Solution

by:
AlfaNoMore earned 400 total points
ID: 8078608
FormatNumber will give you what you want?

If you want a different currency next to the number, you can set the LocaleID for the locale you want.

LCID=2057   GBP/UK
0
 
LVL 15

Expert Comment

by:gladxml
ID: 8078708
lico,

Instead of formatcurrency you can use the round function...

Check the link below for more details...

http://www.intranetsplus.com/Industry/dev/vbscript/round.html

HTH...


0
 
LVL 15

Expert Comment

by:gladxml
ID: 8078795
lico,

Using round function will not work directly as fromat currency you still need to manipulate the data...



0
Independent Software Vendors: 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 4

Expert Comment

by:Wakie
ID: 8078946
If you want to continue using your formatcurrency function, but without the dollar sign attached, you can remove it like this:

<%
intCurrency = "yourValueHere"
response.write right(intCurrency, len(intCurrency) - 1)
%>

Regards,
Wakie.
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 8078989
Slow down boys. FormatCurrency without the curreny symbol == FormatNumber! Simple.

You want a different currency symbol instead of the Default US dollar sign, well then set the LocaleID, eith at the top of the page, or even within the session:

<%@ Language="VBScript" LCID="2057" %>

<% Session.LCID = 2057 %>
0
 
LVL 2

Expert Comment

by:memerot
ID: 8080280
As alfanomore says, format number will work.  But I think the following snippet is a little clearer as to your intent:

Replace(FormatCurrency(curAmount), "$", "")

Since it clearly shows that you are treating the value as money and just hiding the dollar sign.  It also clearly shows that you are hiding a dollar sign, showing the right X most characters does the same thing but is a bit more obscure to read.
0
 
LVL 58

Expert Comment

by:Gary
ID: 9352839
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Answer by AlfaNoMore

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
EE Cleanup Volunteer
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

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

764 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