// return String yyyyMMddHHmmss,例如:20180531110725
public static String getStringDate() {
Date currentTime = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateString = formatter.format(currentTime);
String year = dateString.substring(0, 4);
String month = dateString.substring(5, 7);
String day = dateString.substring(8, 10);
String hour = dateString.substring(11, 13);
String min = dateString.substring(14, 16);
String sec = dateString.substring(17);
String date = year+month+day+hour+min+sec;
return date;
}