问题描述:

2013-06-24 15:43:00.0 this is Sting

i want parse that to Date

but in same formate

if Month is Month Jan it should be 1 etc

网友答案:

Use the SimpleDateFormat like this:

String dateString = "2013.06.24 15:43:00";

SimpleDateFormat sdfToDate = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");

Date date1 = sdfToDate.parse(dateString);

System.out.println(sdfToDate.format(date1));
相关阅读:
Top