I have String
String ackwardDate="2012-10-30T19:14:58";
i need to convert to date format.then tried like this
ackwardDate=ackwardDate.replace("T", " ");
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
try {
Date date = formatter.parse(ackwardDate);
System.out.println(date);
System.out.println(formatter.format(date));
} catch (ParseException e) {
e.printStackTrace();
}
it working fine. Is there any other method?