java代码工具--Date格式化

格式化时间:

SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 String time="2013-11-29 14:37:20";
 Timestamp time1=new Timestamp(sdf.parse(time).getTime());
posted @ 2016-05-09 15:25  时光.漫步  阅读(167)  评论(0编辑  收藏  举报