title: Convert Date dd/mm/yyyy to mm/dd/yyyy vb.net
body: <p>I have this code </p>
  
  <pre><code>    Dim conex As SqlConnection = New SqlConnection(conxst)
      Dim caixa As Integer = ComboBox1.SelectedItem
      Dim verdat As Date = DateTimePicker1.Text
      Dim verdat1 As Date = "05/07/2012"
      conex.Open()
      Dim ds As New DataSet
      Dim dt As New DataTable
      ds.Tables.Add(dt)
      Dim da As New SqlDataAdapter("select codigo,data,horario from alteraca where data = '" &amp; verdat1 &amp; "' ", conex)
      da.Fill(dt)
  </code></pre>
  
  <p>this code work when verdat1 is in the format "mm/dd/yyyy" , how i convert the date from mine datetimepicker (dd/mm/yyyy) to the format "mm/dd/yyyy" to place in the statment??? Thanks.  </p>