Fomatting a number

L

Lloyd Sheen

I have now wasted too much time on this. I simply need to have a ToString
format string that will take all values from 0 to 9 and return 00-09 and for
numbers from 10-59 it is just 10-59.

Any ideas?

Lloyd Sheen
 
H

Herfried K. Wagner [MVP]

Lloyd Sheen said:
I have now wasted too much time on this. I simply need to have a ToString
format string that will take all values from 0 to 9 and return 00-09 and
for numbers from 10-59 it is just 10-59.

\\\
Dim i As Integer = ...
MsgBox(i.ToString("D2"))
///
 

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