How to format string add commas at thousand position?

  • Thread starter Thread starter Netmonster
  • Start date Start date
N

Netmonster

All,

How to format string add commas at thousands position, and hundred
thousands position

Example 1: I have string s = "1001"; or could be a random number I want
the output to be 1,001.

Example 2 : I have string s = "1000001"; or could be a random number I
want the output to be 1,000,001.



Thanks in advance

KC
 
All,

How to format string add commas at thousands position, and hundred
thousands position

Example 1: I have string s = "1001"; or could be a random number I want
the output to be 1,001.

Example 2 : I have string s = "1000001"; or could be a random number I
want the output to be 1,000,001.



Thanks in advance

KC
Look up string.Format in the documentation.

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

string format 9
Intersect of 2 strings 23
Thousand/Decimal seperator 3
String Encryption Help 22
convert string to int 11
formatting and aligning numbers of string 2
append character to string 1
Decimal to Word 2

Back
Top