title: Display date without time
body: <p>How display date without time? (In database I have without time, just data).</p>
  
  <p>I get on a site:</p>
  
  <p>2012-02-05 00:00:00</p>
  
  <p>2012-02-07 00:00:00</p>
  
  <p>2012-02-08 00:00:00</p>
  
  <p>2012-11-30 00:00:00</p>
  
  <p>Controller:</p>
  
  <pre><code>           var today = DateTime.Now.Date;
  
              var date = (from d in baza.Rezerwacjas 
                          where today&lt;= d.data_rezerwacji 
                          select new { d.data_rezerwacji }).Distinct();
  
              ViewBag.daty = date;
  
              return View();
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>@using (Html.BeginForm()) {
      @Html.ValidationSummary(true)
      &lt;fieldset&gt;
  
          @{ 
      var grid = new WebGrid(ViewBag.daty ,null, "Daty", 8);
                }
  @grid.GetHtml(
          tableStyle: "grid",
          headerStyle: "head",
          alternatingRowStyle: "alt",
          columns: grid.Columns(
                 grid.Column("data_rezerwacji","Daty")           
  
  
        )
          )
  
  
      &lt;/fieldset&gt;
  }
  </code></pre>