title: Convert datetimePicker.Value to TimeSpan
body: <p>I am using Entity Framework (database 1st) and trying to assign a value from datetimePicker on a winform to a TimeSpan property to insert into a database:</p>
  
  <pre><code>Schedule schedule = new Schedule()
  schedule.time = datetimePicker1.Value
  </code></pre>
  
  <p>I think I figured this out a long time ago, but am unable to resolve it at this moment.  How can I convert the datetimePicker1.Value to time (DateTime to TimeSpan) ?</p>
  
  <p>Thanks!</p>