17,740
社区成员
发帖
与我相关
我的任务
分享
DateTime dt = DateTime.ParseExact("2016年12月", "yyyy年MM月", System.Globalization.CultureInfo.InvariantCulture);
https://msdn.microsoft.com/zh-cn/library/w2sa9yss.aspxstring d = "2016年12月";
string d1 = DateTime.Parse(d).ToString("yyyy-MM-dd HH:mm:ss");
var dt = DateTime.ParseExact("2016年12月", "yyyy年MM月", CultureInfo.DefaultThreadCurrentCulture)
转化为DateTime后,随便你怎么转成其它格式字符串了