Java Date格式的转换
Date d = new Date(); String s; /** Date类的格式: Sat Apr 16 13:17:29 CST 2006 */ System.out.println(d); System.out.println("******************************************"); /** getDateInstance() */ /** 输出格式: 2006-4-16 */ s = DateFormat.getDateInstance().format(d); System.out.println(s); /** 输出格式:
下载地址
用户评论