Formatting a string with leading zeroes.

  • Thread starter Thread starter Andrew Chalk
  • Start date Start date
A

Andrew Chalk

If I have a number representing a number of minutes and I want to format it
as a string with two characters, with a leading 0 if the value is less than
10, how do I do that?

Many thanks.
 
Andrew,
If I have a number representing a number of minutes and I want to format it
as a string with two characters, with a leading 0 if the value is less than
10, how do I do that?

number.ToString("00")


Mattias
 
Back
Top