Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I Have one doubt, what is the dataformatstring for million or billion


Edit:
Based on the comments below the OP is trying to display the number in words
e.g. 1,000,000 as 1 Million or 1,000,000,000 as 1 Billion
Hope that clarifys what is requested.
Posted
Updated 15-Dec-13 22:33pm
v2
Comments
Matt T Heffron 16-Dec-13 12:35pm    
This is the same issue as http://www.codeproject.com/Questions/697271/Dataformatstring-property-for-million-or-billion
(which WAS answered) just worded differently.

1 solution

For numbers;
{0:N} or {0:Nx} where x is the number of decimal places to show, you can also use lower case n.

For currency, use the same as number, but change the N/n for C/c
 
Share this answer
 
Comments
Ratheesh S 16-Dec-13 2:39am    
Friend its not working properly,in my radhtmlchart y axis value is like $5,000,000,000.00 i want to show this value as 5 billion or $6,000,000,000.00 as 6 billion like this only i expect
DaveAuld 16-Dec-13 4:30am    
There are no functions available to do that (I don't think). You must write your own. I am sure if you search CodeProject you will find one, as these keep appearing all the time in the moderation queues. There is a interop function to do that with Byte sizes, but not seen one for numerics.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900