/**
* 生成随机图片文件名,年月日时分秒格式
*/
String getString() {
Date date = new Date(System.currentTimeMillis());
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String string = simpleDateFormat.format(date);
return string;
}
Java之获取年月日时分秒字符串
苟利国家生死以, 岂因祸福避趋之