« first day (2 days earlier)    last day (15 days later) » 

4:21 PM
@Csi
u can use this chat box
 
Csi
4:39 PM
@Sachu test
If i have this :

public class DBManager {

private PreparedStatement LookForDepartureStation;



public DBManager(String url, String user, String password) {

LookForDepartureStation = connection.prepareStatement("SELECT * from Journey where departure = ?"); // departure is a VARCHAR2 in DB
// other stuff
}


public List<Train> SeeTrains(String departure_station, String arrival_station, java.util.Date before, java.util.Date later) {

ArrayList<Train> ListTrains = new ArrayList<>();

try {
java.sql.Date beginning = new java.sql.Date(later.getTime());
Btw, sorry for not coming back Friday. I had to leave because the caretaker came to close the labs, so i was in a hurry. Because of that, i saved the wrong files and lost my work, i was to mad to come back and try again to make it work (i managed on Saturday)
 
Csi
5:17 PM
(i found)
Dates are such a pain to handle...
 
5:45 PM
@Csi
which line is showing the null point exceltion
LookForDepartureStation.setString(1, departure_station); ?
 
 
1 hour later…
Csi
6:47 PM
Ah, i didn't see your message. That problem of null pointer exception is solved ^^'

My main problem at the moment is that i got dates defined like this in my DB : to_date('2015/05/16 3:00', 'yyyy/mm/dd hh24:mi') (exemple from an insert into) and i need to use String to find those dates. I'm in trouble with this :S The best try i had gave me the days but not the hours and minutes :'(
 

« first day (2 days earlier)    last day (15 days later) »