SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日"); //MM必须为大写System.out.println("时间为:"+sdf.format(new Date()));