时间精确到毫秒

Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.sss");
String date2 = sdf.format(date);

猜你喜欢

转载自blog.csdn.net/dd2016124/article/details/83624011