Convertir la fecha en cadena utilizando simpledateformat
Tengo problemas al convertir una fecha en cadena en un formato diferente. La fecha:
lastDownloadDate>>Wed Feb 27 16:20:23 IST 2013
lastChangeDate>>Wed Feb 27 15:11:00 IST 2013
Quiero convertir este formato a otro formato:yyyy-mm-dd HH:mm:ss
.
Cuando intento convertirlo estoy obteniendo diferentes resultados usando:
DateFormat outputFormat = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
String lastDownloadTimeVal = outputFormat.format(lastDownloadDate);
System.out.println("lastDownloadTimeVal>>"+lastDownloadTimeVal);
String lastChangeTimeVal = outputFormat.format(lastChangeDate);
System.out.println("lastChangeTimeVal>>"+lastChangeTimeVal);
Estoy obteniendo el resultado incorrecto, el mes se está reemplazando con minutos:
lastDownloadTimeVal>>2013-20-27 16:20:23
lastChangeTimeVal>>2013-11-27 15:11:00