ITeye博客

format parse 的用法

duyunfengsolo · 2009-09-23 11:28 · JAVA · Markdown

private static final String pattern="yyyy-MM-dd";

private SimpleDateFormat format = new SimpleDateFormat(pattern);

private Date beginDate;

//parse函数是把字符串转换成日期

beginDate = format.parse(contentList.get(0)[3].toString());

//format函数是把日期转换成字符串

item.add(new Label("date",format.format(beginDate)));

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。