Solved

Format Number for Display

Posted on 2004-09-30
2
839 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
[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
2 Comments
 
LVL 3

Accepted Solution

by:
chintan_vaishya earned 25 total points
ID: 12189438
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
ID: 12192329
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

Technology Partners: 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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
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…

626 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