Date d = new Date(System.currentTimeMillis());// 取得当前系统时间,转化为日期类型 SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");// 格式 System.out.println(sdf.format(d));// 格式化上面得到的时间