when I tried to convert the data in a MS Access Database, which I create in Access 2000, all number and string worked fine. But there is a table containning a date type --- 'Date/time' with short date form e.g. today 01-05-08(yy-mm-dd). when compiling it, shows 'DATATIME' type. Java.sql.resultSet has got no method to convert it ( relevant are getDate, getTime, getTimeStamp). Could anybody Help. I would appropriate it.
Apparently, most drivers map a DATETIME to a java.sql.Timestamp, so using getTimestamp() is probably your best bet. If this doesn't work, you can probably use getString(), as that is often supported even if no other getXXX() methods are. You may be able to get a String representation of the date and time, which you can then parse with a DateFormat object to get the Date you wanted in the first place. It would be an inefficient way to go about getting a datetime, but it should work.
"I'm not back." - Bill Harding, Twister
I claim this furniture in the name of The Ottoman Empire! You can keep this tiny ad: