I have time converted from millis and now i would like to make an SQL Insert with that time value. I tried this but it is not working:
String INSERT_RECORD ="INSERT INTO PRAVIDLA (CAS,DEN,MIESTNOST,STAV) values(?,?,?,?)";
PreparedStatement pstmt = con.prepareStatement(INSERT_RECORD);
Calendar calendar1 = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
calendar1.setTimeInMillis(milli);
Time Cas2 = (Time) calendar1.getTime();
pstmt.setTime(1, Cas2);
pstmt.setInt(2, DEN);
pstmt.setString(3, MIESTNOST);
pstmt.setString(4, STAV);
pstmt.executeUpdate();
Any suggestions please?