@string.Format("{0:yyyy-MM-dd}", item.ATime)
逗号前是输出格式,年份有4位数 显示的就是4位数,逗号后是时间的数据
时间按指定格式输出
原文:https://www.cnblogs.com/liangliping/p/9267650.html