日期格式(String-Data-String)

SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd日");
SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd");

String time = formatter.format(formatter2.parse("2016-04-21"));

time最后为"2016年04月21日"

posted @ 2016-04-21 17:47  F领主  阅读(215)  评论(0编辑  收藏  举报