SimpleDateFormat sdf = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”);
String time = sdf.format(new java.util.Date());
java.util.Date timeDate = null;
try {
timeDate = sdf.parse(time);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
java.sql.Date dateTime = new java.sql.Date(timeDate.getTime());
rizhi.setDates(dateTime);
jsp页面 type类型为date时间转为后台timedate类型存储
最新推荐文章于 2020-12-31 06:20:09 发布