日期String相互转换
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date endate = sdf.parse(endDate); Date nowd = new Date(); String nowstr = sdf.format(nowd);
parse是转为Data
format是转为String
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date endate = sdf.parse(endDate); Date nowd = new Date(); String nowstr = sdf.format(nowd);
parse是转为Data
format是转为String