获取当前日期字符串

Calendar cal=Calendar.getInstance();
cal.add(Calendar.DATE, 0);
String today = new SimpleDateFormat("yyyyMMdd").format(cal.getTime());//20180625

你可能感兴趣的:(获取当前日期字符串)