Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Convert Datetype from Access database to Java 'DATETIME'

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If you are using JDBC ODBC bridge driver, then getDate function will work properly. It is just that it shall return a java.sql.Date object without any time info. If you do not need the time info, you can use the getDate method itself. I do not foresee any problem for getDate method with Access DateTime value.
Hope I am clear.
Regards,
Ganp.
 
This tiny ad is suggesting that maybe she should go play in traffic.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!