Formatting DateTime has some match between the standard date and time formatting strings and some of them with a custom format specifier. As a result, when I evaluate this expression:
string.Format(">{0:d}< >{0: d}<", DateTime.Now)
and get this result:
>8/3/2009< > 3<
My question is: how do I get String.Format to output only the day of the month (using the d format) without any surrounding spaces?
source share