Link to home
Start Free TrialLog in
Avatar of Paul Maker
Paul MakerFlag for United Kingdom of Great Britain and Northern Ireland

asked on

MySQL - getDate() - no time !

Hi

I have a DATETIME column in my database, i have checked using mysql and its is storing the data and time portion.. i am using RecordSet.getDate but only getting back the date portion. how do i get the date and time

-P
Avatar of RomanRega
RomanRega

Can't you call getTime() ??
Or try something like this:

new java.util.Date( yourRecordSet.getDate( column ).getTime() );
ASKER CERTIFIED SOLUTION
Avatar of aozarov
aozarov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> getDate( column ).getTime() ...
That is a bad example from the JDK where they should not have extend java.util.Date (getTime comes from there but is meaningless), but rather use Containment...
Avatar of Paul Maker

ASKER

cheers :)
:-)