• 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
  • 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: 29
  • 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
  • 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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!