How to get complete month name from DateTime

后端 未结 9 1498
慢半拍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:10

    You can use Culture to get month name for your country like:

    System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("ar-EG");
    string FormatDate = DateTime.Now.ToString("ffffdd., MMM dd yyyy, hh:MM tt", culture);
    

提交回复
热议问题