Hi
I have the following code to save file info in a data table to a mysql database table via an adapter:
My issue is with LastWriteTime. The format in the datatable is dd/MM/yyyy HH :mm:ss (eg. 02/07/2021 14:51:57). I know Mysql accepts date in yyyy-MM-dd format. I obviously have to Parse or TryParse in the above. After a lot of searching, I just cannot figure out how to apply it.
Any help would be much appreciated.
I have the following code to save file info in a data table to a mysql database table via an adapter:
Code:
With cmd2.Parameters
.Add("@Name", MySqlDbType.VarChar, 50, "Name")
.Add("@LastWriteTime", MySqlDbType.DateTime, "LastWriteTime")
End With
Any help would be much appreciated.