SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy年MM月dd日hh时mm分ss秒");
try {
Date date = simpleDateFormat.parse("2017-8-11 18:30:38");
System.out.println(simpleDateFormat2.format(date));
} catch (ParseException | java.text.ParseException e) {
// TODO: handle exception
e.printStackTrace();
}
网友评论