Display date in short format (Apr 02)
There is a scenario in which I have to display the date in short format(dd-mmm)
for ex : the date selected is 2 April after selecting the above format it开发者_运维百科 should be
before after date format
02 April Apr 02
15 December Dec 15
How do I accomplish this?
MyDate.ToString("MMM dd"); //Note: Caps on MMM
MMM
= Abbreviated Monthdd
= two-digit day
Good References:
- Custom Date & Time Formats
- Standard Formats (won't help your specific situation)
精彩评论