当我在mysql表中插入drr(3)和drr(4)我得到0000-00-00(日期)如何将字符串转换为日期以插入正确的日期
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
connection.Open()
For Each Drr As DataRow In DtSet.Tables(0).Rows
Dim sql As String = ("INSERT INTO test2(account,external_id,amount,transaction_date,office_date,bank,recipt_nb,type,statment,receipt) VALUES ('" & Drr(0) & "','" & Drr(1) & "','" & Drr(2) & "','" & Drr(3) & "','" & Drr(4) & "','" & Drr(5) & "','" & Drr(6) & "','" & Drr(7) & "','" & Drr(8) & "','" & Drr(9) & "')")
Dim command As New MySqlCommand(sql, connection)
command.ExecuteNonQuery()
Next
connection.Close()
MsgBox("Successfully saved")
End Sub
End Class