特定の日付をJavaからデータベースに保存するにはどうすればよいですか? (今日の日付だけでなく、ユーザーが指定したい日付もいくつかあります)
try {
SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy");
Date date = dateFormat.parse(tf.getText());
String d = dateFormat.format(date);
String str = "insert into tableName(tDate) values (?)";
con = mysqlConnection.dbConnector();
prs = con.prepareStatement(str);
prs.setDate(1, // dont know what to put here);
int rsUpdate = prs.executeUpdate();
con.close();
prs.close();
} catch(ParseException exx) {
System.err.println(exx);