I'm trying to get date from jDateChooser
. So I used this update query. But now I'm getting this getDate()
method as cannot find the symbol
error. I'm using JDBC class. And following is my query:
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);
}
You probably have error here:
date.getdate()
It should be capital D
date.getDate()