Convert month int to month name

后端 未结 4 440
孤街浪徒
孤街浪徒 2020-12-07 21:38

I was simply trying to use the DateTime structure to transform an integer between 1 and 12 into an abbrieviated month name.

Here is what I tried:

<
4条回答
  •  南笙
    南笙 (楼主)
    2020-12-07 22:11

    var monthIndex = 1;
    return month = DateTimeFormatInfo.CurrentInfo.GetAbbreviatedMonthName(monthIndex);
    

    You can try this one as well

提交回复
热议问题