.NET MVC 时间格式View显示问题

来源:互联网 发布:系统自动登录软件 编辑:程序博客网 时间:2024/05/20 13:19

将2016/09/27 0:00:00 转换为 2016/09/27

@if (item.字段!= null)   {        @Html.DisplayFor(modelItem => item.字段).ToString().Substring(0, 9)   }    else    {       @Html.DisplayFor(modelItem => item.字段)          }


0 0