SimpleDateFormat sdf = new SimpleDateFormat("yyMMddHHmmss"); System.out.println(sdf.format(new Date()));