simpleDateFormat time conversion all tricks

1. Basic see blog https://blog.csdn.net/hanchaob323/article/details/7371731

2. Convert it yourself


//解析时间
private String dateToString(String dateStr){
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
String strDate = null;
try {
strDate = formatter.parse(dateStr).toString();
} catch (ParseException e) { e.printStackTrace(); }
return strDate;
}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325206540&siteId=291194637