title: input string was not in a correct format c# datetimepicker
body: <pre><code>private void btnSave_Click(object sender, EventArgs e)
          {
              try
              {
                  if (_action == "edit")
                  {
                      update(_id, int.Parse(cbSupplier.ValueMember), dtpTRXdate.Value.ToString("yyyy-MM-dd"), dtpDUEdate.Value.ToString("yyyy-MM-dd"), txtRemarks.Text.ToString(), _conn);
                  }
                  else
                  {
                      insert(int.Parse(cbSupplier.ValueMember), dtpTRXdate.Value.ToString("yyyy-MM-dd"), dtpDUEdate.Value.ToString("yyyy-MM-dd"), txtRemarks.Text.ToString(), _conn);
                  }
              }
              catch (Exception ex)
              {
                  MessageBox.Show(ex.Message);
              }
         }
  
  public void insert(int sup_ID, string TRX_date, string DUE_date, string remarks, MySqlConnection conn)
          {
              MessageBox.Show(sup_ID.ToString() + " " + TRX_date + " " + DUE_date + " " + remarks);
  
              MySqlCommand command = new MySqlCommand();
  
              command.Connection = conn;
              command.CommandText = "INSERT INTO PO_HEADER VALUES(null," + sup_ID + ",'" + TRX_date + "','" + DUE_date + "','" + remarks + "')";
  
              command.ExecuteNonQuery();
          }
  
  public void update(int id, int sup_id, string trx_date, string due_date, string remarks, MySqlConnection conn)
          {
              MySqlCommand command = new MySqlCommand();
  
              command.Connection = conn;
              command.CommandText = "UPDATE PO_HEADER SET SUPPLIER_ID=" + sup_id + ", TRX_DATE='" + trx_date + "', DUE_DATE='" + due_date + "', REMARKS='" + remarks + "' WHERE ID=" + id;
  
              command.ExecuteNonQuery();
          }
  </code></pre>
  
  <p>dtpTRXdate it's datetimepicker<br />
  the problem at : dtpTRXdate.Value.ToString("yyyy-MM-dd") and dtpDUEdate.Value.ToString("yyyy-MM-dd")<br/>
  when i click button save and run the function, it say "input string was not in a correct format"<br/>
  i messagebox the string it's true, example : "2012-12-12"<br/>
  have any idea???</p>