Howto format a date as localized Short MonthDay string

Posted by Wouter on Stack Overflow See other posts from Stack Overflow or by Wouter
Published on 2010-05-07T08:37:06Z Indexed on 2010/05/07 8:48 UTC
Read the original article Hit count: 398

Filed under:
|
|

I would like to format a DateTime to a string containing the month name abbreviated and the date for use in axislabels in a graph.

The default DateTime format strings do not contain abbreviated month. I guess there is no standard but I could take a substring of the first 3 characters of the month name and replace this into the MonthDay format. The reason I would use MonthDay is that the ordering of month and date is locale dependent.

Does anyone have a better idea?

http://msdn.microsoft.com/en-us/library/az4se3k1.aspx#MonthDay

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET