formatting

  • Thread starter Thread starter mp
  • Start date Start date
M

mp

I have a string : string s="13376";
how do I format it to 133.76

Thanks
 
String.Format("{0}.{1}", s.Substring(0, s.Length - 2),
s.Substring(s.Length - 2));
 
Thanks Omlett, basicly I have an amount that I have to format to 9.2
Would this work?
 

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

Back
Top