Ciao ragazzi , Ma come si fà??
Dovrebbe essere facile ma non riesco a convertirlo!
Qualcuno lo sà?
Ciao ragazzi , Ma come si fà??
Dovrebbe essere facile ma non riesco a convertirlo!
Qualcuno lo sà?
Timestamp in millisecondi?
http://java.sun.com/j2se/1.4.2/docs/...Date.html#Date(long)
<´¯)(¯`¤._)(¯`»ANDREA«´¯)(_.¤´¯)(¯`>
"The answer to your question is: welcome to tomorrow"
io ho una variabile timestamp
e la devo passare alla classe preparestatement
una roba del tipo ...
ma non va, come faccio a convertire il timestamp in long per poi ricreare la data? o ....codice:String sql = "SELECT StartDate, EndDate FROM C_date WHERE StartDate<=? "; PreparedStatement pstmt = null; int year = 0; try { pstmt = DB.prepareStatement(sql, null); pstmt.setDate(1,mioTimestamp) ; ................
Quindi hai un campo timestamp nel database? Non sei chiarissimo.
C'è il metodo setTimestamp PreparedStatement in caso
<´¯)(¯`¤._)(¯`»ANDREA«´¯)(_.¤´¯)(¯`>
"The answer to your question is: welcome to tomorrow"
sul db ho una data, ma la variabile che contiene i valori di ricerca è Timestamp
Qualcosa del genere?
codice:pstmt.setDate(1, new Date(mioTimestamp.getTme()));
<´¯)(¯`¤._)(¯`»ANDREA«´¯)(_.¤´¯)(¯`>
"The answer to your question is: welcome to tomorrow"
può essere, ma cosè getTme() , non è un metodo conosciuto dal mio oggetto timestamp
stai usando Timestamp di security o Timestamp di sql? Quello di sql ce l'ha
http://java.sun.com/j2se/1.5.0/docs/...Timestamp.html
<´¯)(¯`¤._)(¯`»ANDREA«´¯)(_.¤´¯)(¯`>
"The answer to your question is: welcome to tomorrow"
Certo, getTime!
Grazie.![]()