I have a property in my view model as follows:
[Editable(false)] [Display(Name = \"Date\")] [DisplayFormat(DataFormatString = \"{0:yyyy/MM/dd}\", ApplyFormat
This work for me:
In the model:
using System.ComponentModel.DataAnnotations; namespace Athlete.Models { public class Foo { [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}")] public DateTime SignDate { get; set; } } }
And in the view:
@Html.DisplayFor(modelItem => item.SignDate)