可能重复:
如何在c#中获取MonthName?
我使用以下c#语法从no月份获取月份名称,但我得到了 August
我只想要Aug
..
System.Globalization.DateTimeFormatInfo mfi = new
System.Globalization.DateTimeFormatInfo();
string strMonthName = mfi.GetMonthName(8).ToString();
任何建议...
3
除了.GetMonthName(INT)没有返回你要找的字符串,它不会返回一个字符串,这样的ToString()是不必要的
—
DaveD
仅添加.Substring(0,3)会更容易吗?
—
Federico Navarrete