How to get complete month name from DateTime

后端 未结 9 1515
慢半拍i
慢半拍i 2020-12-07 23:58

What is the proper way to get the complete name of month of a DateTime object?
e.g. January, December.

I am currently usi

9条回答
  •  情深已故
    2020-12-08 00:18

    You can do as mservidio suggested, or even better, keep track of your culture using this overload:

    DateTime.Now.ToString("MMMM", CultureInfo.InvariantCulture);
    

提交回复
热议问题