title: How to get only the Time from DateTime datatype
body: <p>I have a table called <code>TimeSpan</code>.  It contains a column <code>StartTime</code>.  <code>StartTime</code> is of type <code>DateTime</code>.  In my view I pass a time.  Therefore, I need to convert <code>StartTime</code> to <code>time("HH:mm")</code>.  How can I accomplish that?</p>
  
  <pre><code>public ActionResult planview(Double budget, DateTime startTime, DateTime endTime)
  {
      var model = from Ts in db.TimeSpans 
                  where Ts.StartTime &lt; startTime 
                  select Ts;
      return View(model);
  }
  </code></pre>
  
  <p>The above query needs to be changed to <code>Ts.StartTime(convert to time) &lt; startTime</code>.</p>