I got the date which is a string from a form. The date looks like xxxx-xx-xx xx:xx:xx
How can I save this date string to a column whose type is datetime in the database.
I use PreparedStatement psta = new PreparedStatement(sql) to set the values for the sql.
So for the Datetime type column, when i pre-set the value. I should use psta.setDate() or use psta.setString()?