Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove decimals in a currency [duplicate]

Possible Duplicate:
How do I format a double to currency rounded to the nearst dollar?

How can i remove decimal from a currency?

Here is how I format a number to currency:

string.Format("{0:C}", Amount)

The output is $20,000,000.00 but I need $20,000,000

Thanks in advance

like image 496
user793468 Avatar asked Dec 11 '12 15:12

user793468


1 Answers

Specify you want zero decimal places:

String.Format("{0:C0}",Amount)
like image 181
Mick Walker Avatar answered Oct 11 '22 20:10

Mick Walker