在全局格式化日期的显示方法:
CultureInfo ci = CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name); ci.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd"; System.Threading.Thread.CurrentThread.CurrentCulture = ci;
本文共 280 字,大约阅读时间需要 1 分钟。
在全局格式化日期的显示方法:
CultureInfo ci = CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name); ci.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd"; System.Threading.Thread.CurrentThread.CurrentCulture = ci;
转载于:https://my.oschina.net/u/2614542/blog/857270