Since I seem to forget how to get/convert dates from the database into Java using JDBC (I use Oracle and MySQL for different projects), a reminder:
Suppose there is a MySQL table structure like:
create table prp_models ( prp_id int(10) unsigned not null auto_increment, prp_created datetime default null, prp_ )
Then a proper way to get the prp_created column from a resultset (res) is:
java.sql.Timestamp myDateTime = res.getTimestamp(2); // res #1 is the ID
If you want to get the date time in a displayable format (String), you can use:
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(myDateTime.getTime());
Note on the side: within Java you can set myDateTime with system time using:
myDateTime = new Timestamp(System.currentTimeMillis());