I am trying to convert a java date object to sql date object. I tried to implement something on my own and came up with the following:
try {
rs.updateDate("", (java.sql.Date) new SimpleDateFormat("dd-MM-yyyy").parse(jTextFieldDate.getText()));
} catch (ParseException ex) {
Logger.getLogger(helpdesk.class.getName()).log(Level.SEVERE, null, ex);
}
Here rs is a Result Set
object and jTextFieldDate as the name suggests is a java text field object. Is this implementation correct. What are the possible problems i may encounter by using this code.....