日期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 

原文地址:https://www.cnblogs.com/Baronboy/p/5910091.html