How to format string add commas at thousand position?

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
 
O

Otis Mukinfus

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

Top