java和mysql日期的问题。通过java向mysql中插入datetime类型的数据: String sql = "INSERT INTO wp_posts ( post_date )VALUES(?)"; PreparedStatement pstmt = connection.prepareStatement(sql); Timestamp time = new Timestamp(System.currentTimeMillis()); pstmt.setTimestamp(1, time