I have a date stored in my database as a string 14/08/2010. I want to parse it into a date in order to compare it with the current date. This is what I did but it doesn't compile I don't know why:
try{
date = new SimpleDateFormat("dd/MMM/yyyy").parse(rs.getString(2));
System.out.println(rs.getString(2));
}catch(ParseException s){
s.printStackTrace();
}
It prints this error:
java.text.ParseException: Unparseable date: "14/08/2010"
I tried changing the date format to dd/MM/yyyy but I have the same problem.