时间按指定格式输出

@string.Format("{0:yyyy-MM-dd}", item.ATime)

逗号前是输出格式,年份有4位数 显示的就是4位数,逗号后是时间的数据

猜你喜欢

转载自www.cnblogs.com/liangliping/p/9267650.html