Storing data in Short Date format

T

TESA0_4

Hi,
I have produced a couple of other Access databases where, in the Table
design, I have selected Short Date and only the date has been stored in the
table. In the current database I am working on I have selected Short Date on
table fields but find that the date AND time is being saved. This is causing
problems whem I want to seach by date.
Can anyone suggest why, on this occasion, Short Date format is causing date
and time to be saved (like the General Date format) when data is entered
through a form (where the control is also set to Short Date format)? The
problem is evident on all the date fields I have created in all tables in the
database.
Thanks for any assistance you can offer.
 
G

Gary Brown

Format refers to how you SEE the data.
Whether you select 'General Date', 'Long Date', 'Medium Date' or 'Short
Date' the underlying data is the same.
For example, the date/time...
7/15/2008 1:00:00 PM
simply is VIEWED in the following manner for each format.
Long Date Format: Tuesday, July 15, 2008
Short Date Format: 7/15/2008
General Date Format: 7/15/2008 1:00:00 PM

Your DATA is different so you are getting different results.
If you don't want the time in your fields, you can create a replace query
using the Date(yyyy,mm,dd) function to strip the time out.
 
T

TESA0_4

Hi Gary,
I am confused. I must have made an erroneous selection. My question was
actually intended for the Access (not Excel) discussion forum!! As it turns
out I have discovered what my problem was in Access. I was defaulting data
entry using Now() rather than Date.
Thanks for your interest and response because until I recieved the link to
your reply I had no idea that my question was in the Excel discussion forum!!
Obviously, this explains why I couldn't find my question in the Access forum!!

Regards,

Terry
 

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

Top