Following is the cut/paste from blog post of SteveXCompiled. I have added it here for my future reference Q: How do I show numbers with 5 fixed digits with leading zeroes A: int _num1 = 123; int _num2 = 45; int _num3 = 123456;String.Format(“{0:00000}”, _num1); //”00123″ String.Format(“{0:00000}”, _num2); //”00045″ String.Format(“{0:00000}”, _num3); //”123456″String.Format(“{0:d5}”, _num1); //”00123″ String.Format(“{0:d5}”, ...