http://www.yukun.info/blog/2009/02/java-jsp-gregoriancalendar-period.html
のshowTimeメソッド
String showTime(Calendar cal) { String str; str = cal.get(Calendar.YEAR) + "/" + (cal.get(Calendar.MONTH) + 1) + "/" + cal.get(Calendar.DATE) + " " + cal.get(Calendar.HOUR) + ":" + cal.get(Calendar.MINUTE); return str; }
を
String showTime(Calendar cal) { Date date = cal.getTime(); SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd HH:mm"); return format.format(date); }
と書けばすっきりするよ、import java.text.SimpleDateFormatを忘れずに