Insert Date/Time in MS-Access

T

Tsubasa

Hi guys,
I am doing an VB6 application. I have a problem insert the
date/time in MS-access... i have tried a Insert SQL statement on MS-Access...
Somehow or rather, only the time gets added in... How should i configure MS-
Access in the Design view to store Date and Time in the following format...

dd/mm/yyyy hh:mm:ss

Please view the screenshot in this document uploaded to my Geocities web
server. Thanks in advance, guys!

http://sg.geocities.com/pangcanice/Help.doc
 
D

Douglas J. Steele

Regardless of what your short date format may have been set to through
Regional Settings, when using SQL, you must use mm/dd/yyyy format (okay,
this isn't strictly true: you can use an unambiguous format such as
yyyy-mm-dd or dd mmm yyyy. The point is, you cannot use dd/mm/yyyy format,
because Access is going to assume it's in mm/dd/yyyy format for the first 12
days of every month)

However, that doesn't impact what gets stored, or how you can display it
once it's in your tables.

You might want to read Allen Browne's "International Dates in Access" at
http://allenbrowne.com/ser-36.html
or what I have in my September 2003 Access Answers column for Pinnacle
Publication's "Smart Access" newsletter. (The column and accompanying
database can be downloaded at
http://www.accessmvp.com/djsteele/SmartAccess.html)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top