The problem is that a specifier d represents at the same time a “Short date pattern” in Standard DateTime Format Strings and “the day of the month as a number from 1 through 31” in Custom DateTime Format Strings. The latter is what I actually need.
But if I use something like
String.Format("{0:d}", dt);
I get a ShortDate (e.g. “3/9/2008”).
So how should I use d in order to get just the day of the month (e.g. “3”)?
Thanks in advance.
I think, that this is the easiest solution: