Date Formats

L

Linda

Hi All,

I have a date field on an access 2000 form used by multiple users, formated
as a "short date" and is automatically populated with todays date...when a
new record is created. For some reason it also includes the time with the
date. The help or book I have indicates that "short date" should not include
time.

This is not a problem except when droping the data into excel and doing
"and" functions for this date and other dates in the database for comparision
purposes.

For example if a date also includes a time and is compared to another field
with the same date...but without time, it returns a false match. Rightfully
so....but not what I am looking for. Same with formatting the results...the
displayed results look good...but the time is still part of the cell
contents.

I would like the access field to only load the todays date without a time,
is that possible? OR...a way to quickly eliminate the time portion of the
result, once the data is in excel. This has me totally stumped and any
suggestions would be greatly appreciated.
 
G

Graham Mandeno

Hi Linda

You say the field is "automatically populated with todays date". There are
three functions that return the current system clock in different forms:
Time() returns only the time of day (the date is zero)
Date() returns just the date (midnight on the current day)
Now() returns the current date *and* time

I suspect you are using Now() for your field's DefaultValue. If you change
it to Date() then the problem should go away.
 
L

Linda

Thank you Graham...Yes, I was using now() and will change to date() first
thing tomorrow morning. Thanks again for all your help!
--
Linda



Graham Mandeno said:
Hi Linda

You say the field is "automatically populated with todays date". There are
three functions that return the current system clock in different forms:
Time() returns only the time of day (the date is zero)
Date() returns just the date (midnight on the current day)
Now() returns the current date *and* time

I suspect you are using Now() for your field's DefaultValue. If you change
it to Date() then the problem should go away.
 
Top