SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");// 输出字符串System.out.println(df.format(new Date()));