title: Saving DateTimePicker to DB
body: <p>I have a DateTimePicker on my form, and date should be saved ONLY IF user selects some date....In other words, DateTimePicker opens with current date and time displayed - that's fine. But If user doesn't click on control, nothing should be saved in my DB. Can this be done, maybe just setting some property ?</p>
  
  <p>My code:</p>
  
  <pre><code>  Using con As OracleConnection = New OracleConnection("Data Source=MyDB;User Id=Lucky;Password=MyPassword;")
  
              con.Open()
  
              Using cmd As OracleCommand = New OracleCommand()
  
      Const SQL As String = "INSERT INTO MYTable (DTP_Field) VALUES(: date_time)"
  
                  cmd.Connection = con
                  cmd.Parameters.Add(New OracleParameter("date_time", DTP_Example.Text))
  
                  cmd.CommandText = SQL
                  cmd.ExecuteNonQuery()
  
                  MessageBox.Show("Date saved")
  
              End Using
  
          End Using
  </code></pre>
  
  <p>Any help appreciated !</p>