您的位置:首页 > 其它

格式化日期显示

2009-09-09 08:59 148 查看
1. 格式化日期显示:

DateFormat

1 /**

2 * <p>

3 * Represents a simple date format of <c>yyyy-MM-dd HH:mm:ss.SSS</c>.

4 * </p>

5 */

6 private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");

7

8 /**

9 * <p>

* Formats the given date time to a string as <c>yyyy-MM-dd HH:mm:ss.SSS</c>.

* </p>

*

* @param date

* The date time.

*

* @return The current date time in string format.

*/

private static String formatDate(Date date) {

return DATE_FORMAT.format(date);

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: