how to get current month and year

前端 未结 8 711
南方客
南方客 2020-12-25 09:39

Can anybody tell me that how I can get current month and year and show it in a label in ASP.NET?

8条回答
  •  渐次进展
    2020-12-25 10:10

    Like this:

    DateTime.Now.ToString("MMMM yyyy")
    

    For more information, see DateTime Format Strings.

提交回复
热议问题