作者在 2007-11-08 00:51:00 发布以下内容
知道某个日期计算第二天的日期
<%@ page import="java.util.Date,java.text.*"%>
String dateStr="2007/11/30 08:00:00";
Date tempDate0=new Date(dateStr);
long a= tempDate0.parse(dateStr);
long tomorrow = a + 3600000 * 24;
out.println(tomorrow);
java.util.Date tomorrowime = new java.util.Date(tomorrow);
SimpleDateFormat formatterehour = new SimpleDateFormat(
"yyyy-MM-dd 08:00:00");
String tomorrowdate = formatterehour.format(tomorrowime);
out.println(tomorrowdate);
String date= tomorrowdate.substring(0, 19);