SimpleDateFormat f=new SimpleDateFormat("yyyyMMdd'T'HHmmss"); System.out.println(f.format(new Date()));T添加 单引号 就可以了