I have the next code for parse to date in my application server local
Tomcat 5.0.28 and work ok.
if(m_strType.equals("cadena")) {
System.out.println("Formateamos fecha con cadena : " + strValue);
SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
try {
Date fecha = sdf.parse(strValue);
SimpleDateFormat sdf2 = new SimpleDateFormat("dd/MM/yyyy",new Locale("es,ES"));
return(sdf2.format(fecha));
}
catch (Exception e) {
e.printStackTrace();
}
}
I put this class in other Tomcat 5.0.28 in other server and give me the next error:
java.text.ParseException: Unparseable date: "18-abr-2007 0:00:00"
.......
What's problem?
Thank you.