If you are printing them directly, you might prefer to use printf instead of sprintf.
BTW, if you had simply entered "Leading Zeros" in that search box on your upper left, you would have gone directly to Leading Zeros and found that the first reply in that thread answered your question. If that hadn't worked, you could have used Super Search and found a handful of nodes that would have been helpful.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Leading Zeros.....Please Help
by sauoq
in thread Adding Leading Zeros
by vanuatu10
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |