我有这个代码
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 = '" & verdat1 & "' ", conex)
da.Fill(dt)
当 verdat1 的格式为“mm/dd/yyyy”时,此代码有效,我如何将日期从我的 datetimepicker (dd/mm/yyyy) 转换为格式“mm/dd/yyyy”以放置在语句中???谢谢。