I need to format this string...
Its in the code behind of a c# web app.
The string must always end up in the form of ##/##/####
Which is...2 numbers/2 numbers/4 numbers...
So I need to parse the string and if any of the 3 values are not the appropriate amount of digits, it needs to be preceeded with a zero, see below.
5/3/2341 should be 05/05/2341
12/2/1222 should be 12/01/1222
12/12/11 should be 12/12/0011
there should always be 2 digits/ 2 digits/ 4 digits
So I need to parse this string called valNumber to end up in this format. I know I need to use substring and some other methods but need the most effective way.