C
cody
How can I format numbers with leading zeros? I believe I did this before
some time ago but I cannot remember how I did it.
I want the output be 100305 for 10:03:05.
string fname = string.Format("{0}{1}{2}.txt", dt.Hour, dt.Minute,
dt.Second);
I do not want to use ToString() because it generated to much temporary
objects, and DateTime.ToShortTimeString() is culture dependend and contains
colon characters.
some time ago but I cannot remember how I did it.
I want the output be 100305 for 10:03:05.
string fname = string.Format("{0}{1}{2}.txt", dt.Hour, dt.Minute,
dt.Second);
I do not want to use ToString() because it generated to much temporary
objects, and DateTime.ToShortTimeString() is culture dependend and contains
colon characters.