se402036se
asked on
display an int with 1 or 2 digits as a 2 digit number?
If I have an integer with 1 or 2 digits e.g. 1 or 9 or 11 how can I display it as two digits?
i.e.
01, 09 and 11
There must be a function of something instead of inspecting the int and adding a '0' to the begining of it if it is only 1 digit long
Thanks
i.e.
01, 09 and 11
There must be a function of something instead of inspecting the int and adding a '0' to the begining of it if it is only 1 digit long
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can also try MyInteger.ToString.Padleft (2, "0")