title: DateTimePicker.value will not accept date string I'm passing to it - vb.net
body: <p>On one of my forms, I'm listing a load of services and corresponding dates.
  Theres basically a list of services, a checkbox next to each one and a datetimepicker next to the checkbox. If the checkbox is checked, the datetimepicker is visible and the date is set to the contracted end date for that service, if not it is hidden (visible=false).</p>
  
  <p>I read the data for this form in from mysql and stick it in a DataTable like this...</p>
  
  <pre><code>        Dim adapter As MySqlDataAdapter
          Dim productresultstable As DataTable
          cn.ConnectionString = main.myconnectionstr
          Dim commandtext As String
          commandtext = "Select * from products where link_id = '" &amp; customerid &amp; "'"
          adapter = New MySqlDataAdapter(commandtext, cn)
          productresultstable = New DataTable
          adapter.Fill(productresultstable)
  </code></pre>
  
  <p>Then I  sort through it accordingly, checking the relevant checkboxes and setting the datetimepickers. </p>
  
  <pre><code>        p1.Checked = productresultstable.Rows(0)("p1").ToString()
          If p1.Checked = True Then
              p1date.Visible = True
              p1date.Value = Date.Parse(productresultstable.Rows(0)("1_ce").ToString)
          End If
  </code></pre>
  
  <p>The correct checkboxes are all being checked; thats working fine.
  But the datetimepickers all have the date as todays date.</p>
  
  <p>I know that <strong>productresultstable.Rows(0)("1_ce").ToString</strong> is pulling in a date (1_ce is a column with type 'Date' in mysql) because if I add a messagebox so show it to screen, it shows "19/04/2018 00:00:00"...</p>
  
  <p><a href="https://i.stack.imgur.com/U6C6f.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U6C6f.jpg" alt="enter image description here"></a></p>
  
  <p>but no matter what I try, I cant seem to get the value of the corresponding DateTimePicker to show this value.</p>
  
  <p>Can anyone point me in the right direction? 
  Any help is appriciated!</p>