0
Calendar cal = Calendar.getInstance();
PreparedStatement pstmt = conn.prepareStatement("insert into organisation (org_id,name,description,logo,created_date,created_by,is_status) values(?,?,?,?,?,?,?)");
pstmt.setInt(1, 1);
pstmt.setString(2, name);
pstmt.setString(3, description);
pstmt.setDate(4, new java.sql.Date(cal.getTimeInMillis()));
int count = pstmt.executeUpdate();
使用時間戳,而不是的日期 – Jens