title: MVC 5 Display Datetime format
body: <p>I am new in MVC. I have a datetime property and dataannotaion like the following:</p>
  
  <pre><code>        [ReadOnly(true)]
          [DataType(DataType.DateTime), DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0: dd/MMM/yyyy HH:mm:ss}", HtmlEncode = true, NullDisplayText = "-")]
          [DisplayName("Last Update")]        
          [Required(AllowEmptyStrings = false, ErrorMessage = "Last Update is required.")]
          public DateTime LastUpdate { get; set; }
  </code></pre>
  
  <p>When in create page it show good. But when I submit, I got validation error message "The field Last Update must be a date", and the data can not be process. Then I must change input format to "yyyy/MM/dd" and without time for submit.</p>
  
  <p>I am using @Html.EditorFor(). How to display date format (dd/MMM/yyyy) in create page with EditorFor(), and display datetime format (dd/MMM/yyyy HH:mm:ss) in index page ? Or how to pass validation when EditorFor value datetime format like (dd/MMM/yyyy HH:mm:ss) ?</p>