title: MVC storing date without time
body: <p>I am trying to save the date the user enters into a database. The problem is that despite only the date showing in the text box the time is also being saved. This is what it looks like in my model.</p>
  
  <pre><code>{11/02/2015 00:00:00}
  </code></pre>
  
  <p>However this is what I have in my JQuery set up and how I would like it to look when saved to the database, without the time also attached.</p>
  
  <pre><code>$("#datepicker").datepicker({ dateFormat: 'dd/mm/yy' });
  </code></pre>
  
  <p>I assume the problem lies in my model somewhere so this is how I have it set up at the moment.</p>
  
  <pre><code>    [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")]
      public DateTime DateOfBooking { get; set; }
  </code></pre>
  
  <p>and this is my view,</p>
  
  <pre><code>    &lt;div class="form-group"&gt;
          @Html.LabelFor(model =&gt; model.DateOfBooking, new { @class = "control-label col-md-2"})
          &lt;div class="col-md-10"&gt;
              @Html.TextBoxFor(x =&gt; x.DateOfBooking, new { @id = "datepicker" })
              @Html.ValidationMessageFor(model =&gt; model.DateOfBooking)
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>