02/Oct/2019:11:55:28 类型的时间转换为

public static String upDataTime(String time) {
Date upTime = new Date();
String newtime = null;
SimpleDateFormat format = new SimpleDateFormat("dd/MMM/yyyy:HH:mm:ss",Locale.US );
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
upTime = format.parse(time);
newtime = sdf.format(upTime);
} catch (ParseException e) {
e.printStackTrace();
}
return newtime.toString();
}

原文地址:https://www.cnblogs.com/zhf123/p/11958650.html