| Author |
Retreiving the current data from the database
|
Hanna Habashy
Ranch Hand
Joined: Aug 20, 2003
Posts: 532
|
|
I am trying to get the date from the database. I can read it fin, but the hour, minutes, and sec values are missing.
Here is a segment of my code:
The value in sqlDate returned is 2009-09-03, however the value returned from the database console is 2009-09-03 12:16:13.747
How can I get the full date?
I tried use Date.getTime(), cast it to java.util.Date, not it not working.
Your help is appreciated.
|
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
|
 |
Rene Larsen
Ranch Hand
Joined: Oct 12, 2001
Posts: 1179
|
|
Have you tried with rs.getTimestamp(1) ??
|
Regards, Rene Larsen
Dropbox Invite
|
 |
Hanna Habashy
Ranch Hand
Joined: Aug 20, 2003
Posts: 532
|
|
Rene Larsen wrote:Have you tried with rs.getTimestamp(1) ??
Thank you very much, this solved it.
|
 |
 |
|
|
subject: Retreiving the current data from the database
|
|
|