Hi,
I am observing a strange error with the time portion of the java.sql.Date()
when using resultSet.getDa te() - it always seems to show 12:00:00.
The following code prints 2004-10-27 11:00:00.0
String dtStr = resultset.getSt ring("PROMISEDA TE");
System.out.prin tln(dtStr);
The following code prints 2004-10-27 12:00:00
java.util.Date dt = resultset.getDa te("PROMISEDATE ");
System.out.prin tln(new SimpleDateForma t("yyyy-MM-dd
hh:mm:ss").form at(dt));
Any clue why the getDate screws up the time? Any remedies you may suggest?
Many thanks
SB
I am observing a strange error with the time portion of the java.sql.Date()
when using resultSet.getDa te() - it always seems to show 12:00:00.
The following code prints 2004-10-27 11:00:00.0
String dtStr = resultset.getSt ring("PROMISEDA TE");
System.out.prin tln(dtStr);
The following code prints 2004-10-27 12:00:00
java.util.Date dt = resultset.getDa te("PROMISEDATE ");
System.out.prin tln(new SimpleDateForma t("yyyy-MM-dd
hh:mm:ss").form at(dt));
Any clue why the getDate screws up the time? Any remedies you may suggest?
Many thanks
SB
Comment