473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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 10926
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
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
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
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
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
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
by: ljb | last post by:
Does anyone know how to correct or why formatcurrency() places the dollar sign after the number? thanks LJB
0
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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
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...
0
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
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...

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.