File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Insert a row into MS Access2003 successfully,But the long date(YYYY/MM/DD HH:mm:ss) was changed

 
Jessen Gan
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I inserted a row into MS Access2003 successfully by JAVA JDBC, but the long date (YYYY/MM/DD HH:mm:SS ) was changed to short date(YYYY/MM/DD) in access2003.

Even through,I changed the date time format of my local MS XP System to be 'YYYY/MM/DD HH:mm:SS',then insert another row into MSAccess2003 ,the date format be 'YYYY/MM/DD 00:00:00'.

This question boring me so much.

What's the reason be?

What should I do to fix it?

Any suggestion can help!
 
Suraj Jadhav
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the format of field(Date in MS Access) in which you are inserting the record. I guess changing the format of operating system won't help. You need to check the format in MS Access how it is storing the data.
 
Jessen Gan
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for Suraj Jadhav's suggestion:

I had changed the date format to (YYYY-MM-DD HH:mm:SS) of the row, not working good.

If I am not finding a fine solution of the question.

May be I should storing the date value to be varchar type int the MSAccess,then get results out, using SimpleDateFormat.format(String dateStr) method change String to Date type.

this is the second choose.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic