473,569 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FormatCurrency or equiv

Anyone have code that will format a decimal value to a string currency
format for display? Something like FormatCurrency( ) in VBscript had?

I usually search thecodeproject. com first, but something's wrong b/c I can't
get to the articles where there might be an answer.

Thanks in advance,
Andrea
Nov 16 '05 #1
2 10952
Hello

decimal c = 10;
Console.WriteLi ne(c.ToString(" C"));

Best regards,
Sherif

"Andrea Williams" <an*******@hotm ail.IHATESpam.c om> wrote in message
news:#j******** *****@TK2MSFTNG P11.phx.gbl...
Anyone have code that will format a decimal value to a string currency
format for display? Something like FormatCurrency( ) in VBscript had?

I usually search thecodeproject. com first, but something's wrong b/c I can't get to the articles where there might be an answer.

Thanks in advance,
Andrea

Nov 16 '05 #2
I was going to write that I found it but you beat me to it.

THANKS!

Andrea

"Sherif ElMetainy" <el************ *@wayout.net.NO SPAM> wrote in message
news:uV******** ******@TK2MSFTN GP11.phx.gbl...
Hello

decimal c = 10;
Console.WriteLi ne(c.ToString(" C"));

Best regards,
Sherif

"Andrea Williams" <an*******@hotm ail.IHATESpam.c om> wrote in message
news:#j******** *****@TK2MSFTNG P11.phx.gbl...
Anyone have code that will format a decimal value to a string currency
format for display? Something like FormatCurrency( ) in VBscript had?

I usually search thecodeproject. com first, but something's wrong b/c I

can't
get to the articles where there might be an answer.

Thanks in advance,
Andrea


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2610
by: eddie wang | last post by:
formatcurrency function puts ( ) for negative numbers(e.g. (111) ). How can I display the negative numbers with a minus sign infront like -111. Thanks. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
3
5099
by: Jack | last post by:
Hi, I got the following line in the formatcurrency statement that is giving error. Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" & FormatCurrency(TotPersonnel) & "</TD>" & vbCRLF The error message is: Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: 'formatcurrency' /gwisprod/FSR_EditDetailPrint.asp, line 345
3
2252
by: jrefactors | last post by:
I want to ask what are the possiblities to truncate data from 1 million dollars to 1 dollar by using formatCurrency and CCur functions? The ASP page has code <%= formatCurrency(rs(14)) %>, the database rs(14) is 100000000. But when it displays it in the screen, it shows $1.00 with code <%= formatCurrency(rs(14)) %> There is another place...
2
1428
by: Andrea Williams | last post by:
Anyone have code that will format a decimal value to a string currency format for display? Something like FormatCurrency() in VBscript had? I usually search thecodeproject.com first, but something's wrong b/c I can't get to the articles where there might be an answer. Thanks in advance, Andrea
5
21842
by: Mark | last post by:
I have a field that has been formatted using the vb.net FormatCurrency method. Now, I need to get the amount back into a regular field so I can use it for calculations. Is there an easy way to remove the formatting characters ($,) ? I suppose I could always use the replace function to remove the $ and comma, but I wasn't sure if there was...
5
1653
by: ljb | last post by:
Does anyone know how to correct or why formatcurrency() places the dollar sign after the number? thanks LJB
0
1501
by: Terje | last post by:
On my computer this code: Response.Write FormatCurrency(1000) returns kr 1?000,00 where the question mark is character code 160. What is going on here? Vista, IIS7 and Response.LCID = 1044 terje
5
2050
by: Patrick A | last post by:
All, I'm dealing with a 3rd party application that can't interpret the Access function FormatCurrency. When it encounters my query with "Exclu: FormatCurrency(, 0)", it arfs. The vendor says I have to use "straight SQL." Can someone point me to a good SQL reference where I can find the SQL eqiuvalent, assuming there is one?
1
2342
by: r90slash6 | last post by:
Hi, I am trying to display a field as currency from a recordset to a text field to my asp page. I am using FormatCurrency vbscript function. Everything works as designed if the field displayed contains a number. However, if the field is null, I receive a VBScript runtime error '800a000d. Below is the code: <input name="txtLastMonthEac"...
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.