我正在尝试从中获取日期jDateChooser
。所以我使用了这个更新查询。但现在我将此getDate()
方法视为cannot find the symbol
错误。我正在使用 JDBC 类。以下是我的查询:
try {
new JDBC().putData("UPDATE work SET balance='"+txtValue.getText()+"', date='"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date.getdate()) +"' WHERE id='1'");
} catch (Exception e) {
JOptionPane.showMessageDialog(null, this.getClass().getName() +" "+e);
}