title: ASP.NET MVC Core date only format is not working using DataAnnotation
body: <p>Following <code>viewmodel</code> used in a view is supposed to display a StartDate as, say <code>9/30/2015</code>. But it is displaying as <code>9/30/2015 12:00:00 AM</code>. How can I make it display without time while <strong>using</strong> <code>DataAnnotaion</code>? I know I can use <code>@Model.StartDate.ToString("MM/dd/yyy")</code> inside view to display date only. But that would mean you have to do it in every view that is using the following <code>ViewModel</code>:</p>
  
  <p><strong>ViewModel</strong>:</p>
  
  <pre><code>...
  [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}")]
  public DateTime StartDate { get; set; }
  ...
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The corresponding model class of the above <code>ViewModel</code> already has the following <code>DataAnnotation</code> that correctly creates the data type in SQL Server table as <code>Date</code>; and when you run a query on the corresponding table in <code>SSMS</code> it correctly displays the StartDate column's data with dates only, say, 9/30/2015 etc.)</p>
  
  <p><strong>Model</strong></p>
  
  <pre><code>...
  [DataType(DataType.Date)]
  public DateTime StartDate { get; set; }
  ...
  </code></pre>
  
  <p>StartDate in the sql db is in fact <code>Date</code> only. Moreover, if I run a query on <code>SSMS</code> it correctly returns date only.</p>