もう長い間検索しましたが、答えが見つかりません。私の質問は簡単です...
Javaを使用して日付形式のSQLデータベースに今日の日付を挿入するにはどうすればよいですか? ここにコードがあります。(時間と日付は現在nullです。現在の時間と今日の日付を取得するにはどうすればよいですか)
String timeNow = null;
DateFormat dateNow = null;
String sql = "INSERT INTO fys.`luggage` (customer_id, description, location, date, time, is_lost, is_handled) VALUES ('"
+ customerId + "', '" + description + "', '" + location + "', '"
+ dateNow + "', '" + timeNow + "', '" + isLost
+ "', '" + isHandled + "')";
db.insertQuery(sql);
}