One formatting option for the DateTime object in C# that is missing is the ability to display the correct suffix for a given date, as in 4th January - Usually the best you can hope for is something like 4 January which looks crap.
Here's a quick extension method I've written which will automatically calculate it for you and allow you to format the date as normal.
Call the code like this:
DateTime myDate = new DateTime(2000,1,1,0,0,0); Debug.Print(myDate.ToStringWithSuffix("dd[$suffix] mmm yyyy"));
Job done :)
;
Comments
Please consider what you post!
Chillax if you're angry.