DateTimeFormatInfo.GetMonthName Method
string strMonth = DateTime.Now.ToString("MMMM")
For the default invariant DateTimeFormatInfo, this method returns a string from the GregorianCalendar:
| month | Return Value |
|---|---|
| 1 | "January" |
| 2 | "February" |
| 3 | "March" |
| 4 | "April" |
| 5 | "May" |
| 6 | "June" |
| 7 | "July" |
| 8 | "August" |
| 9 | "September" |
| 10 | "October" |
| 11 | "November" |
| 12 | "December" |
| 13 | "" |
Calendar objects can accommodate calendars with 13 months. For 12-month calendars, the empty string is always returned as the name of the 13th month.
Reff: http://msdn.microsoft.com/en-us/library/d4009dd5%28vs.71%29.aspx
No comments:
Post a Comment