码迷,mamicode.com
首页 > 其他好文 > 详细

把20170909格式转成2017-09-09格式

时间:2017-11-11 23:47:56      阅读:208      评论:0      收藏:0      [点我收藏+]

标签:led   orm   new   imp   code   form   res   art   div   

1 SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
2                          SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
3                          startDate = sdf2.format (sdf.parse (startDate));;
4                          endDate = sdf2.format (sdf.parse (endDate));;
5                          result.put("startDate", startDate);
6                         result.put("endDate", endDate);

 

把20170909格式转成2017-09-09格式

标签:led   orm   new   imp   code   form   res   art   div   

原文地址:http://www.cnblogs.com/qingruihappy/p/7820320.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!