Solved

Format Number for Display

Posted on 2004-09-30
2
833 Views
Last Modified: 2011-09-20
How can output a double or decimal with 2 numbers after the decimal, and a comma when it's supposed to for every 3 digits?  I also don't want a $ dollar sign.  

When I so String.Format("{0:c}" ) it give the dollar sign I don't want.

When I do Math.Round(myVariable) I don't get the comma at every 3rd digit.

Is there
0
Comment
Question by:champ_010
2 Comments
 
LVL 3

Accepted Solution

by:
chintan_vaishya earned 25 total points
Comment Utility
HI,

Use this.

string.Format("{0:0,0.00}",12345332.8)

This gives output as,

12,345,332.80


This is exactly you want, i think

Good luck.
Chintan.
0
 
LVL 1

Author Comment

by:champ_010
Comment Utility
hmmm...that will display the way i want alright--by any chance is there a way to keep it an integer type so that i can still perform calculations on it?

thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now