Citation:
Connection conBD = null;
Class.forName("oracle.jdbc.driver.OracleDriver");
String chaine = "jdbc:oracle:thin:@"+IPBD+":"+PortBD+":"+SIDBD;
conBD = DriverManager.getConnection(chaine,UserBD,PasswordBD);
Puis quand je fais
Citation:
PreparedStatement ps = conBD.prepareStatement("select * from FACTURE where NUMFACTUREINTERNE = ?");
ps.setString(1, NumFacture);
ResultSet rs = ps.executeQuery();
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
System.out.println("date facture" + sdf.format(f.getDateFacture())
+"date ms : " + rs.getDate(3).getTime()
+ "date du jour ms : " + (new Date()).getTime());
J'obtiens comme resulttat :