标签:
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
日期String相互转换
原文地址:http://www.cnblogs.com/Baronboy/p/5910091.html