服务器返回这样的时间2016-08-17T16:19:53.57
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
Date date = sdf.parse(probationBean.getCreateTime());
String createTime = sdf2.format(date);
holder.tvProbationTime.setText("申请于" + createTime);
} catch (ParseException e) {
e.printStackTrace();
}
网友评论