473,503 Members | 2,029 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 10935
Hello

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

Best regards,
Sherif

"Andrea Williams" <an*******@hotmail.IHATESpam.com> wrote in message
news:#j*************@TK2MSFTNGP11.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.NOSPAM> wrote in message
news:uV**************@TK2MSFTNGP11.phx.gbl...
Hello

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

Best regards,
Sherif

"Andrea Williams" <an*******@hotmail.IHATESpam.com> wrote in message
news:#j*************@TK2MSFTNGP11.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
2606
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...
3
5093
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...
3
2248
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...
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...
5
21818
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...
5
1650
by: ljb | last post by:
Does anyone know how to correct or why formatcurrency() places the dollar sign after the number? thanks LJB
0
1499
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 ...
5
2044
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...
1
2339
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...
0
7091
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
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...
1
6998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5586
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,...
0
4680
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3171
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...
0
1516
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 ...
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.