I created a table called "myTable" with the column CURRENT_DATE, and this data type is "DATE". When I update my table programmatically, I also want to place the timestamp or system date in the CURRENT_DATE field. Part of what I'm doing is shown below, but it does not work. I would think it would be easy, but ... Can you help?
//System date is captured for placement in the CURRENT_DATE field in myTable
java.util.Date currentDate = new java.util.Date();
...
stmt.executeQuery("INSERT INTO myTable (NAME, CURRENT_DATE) VALUES (' " + userName + " ', ' " + currentDate + " ') ");
source
share