So:
- they DO match when displayed like this, and
- there is no fractional part to the numbers, but
- they DON'T match when you display them as dates?
Don't worry about the short date format. That's not relevant if they are
Date/Time fields. If you open your table in design view, they are
date/time
fields aren't they? Or are they Text fields?
When you see the dates in your query, do they left-align (like text) or
right-align (like numbers)?
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
Dear Allen
By using your advised function, I made two queries for the tables and
the
dates fields are successfully shown as double numbers. However, when
the
matching actually take place the double numbers date are automatically
return
to short date format...and the same happened.
:
Okay, Warren.
Now ask Access to show you the fields as numbers. Create a query, and
enter
this as a calculated field into a fresh column in the Field row:
CDbl(Nz([date1], #0:00:00#))
Do you see whole numbers returned? Fractional numbers? Do they match?
This should help you to determine whether the problem is caused by:
- wrong century in the date;
- time aspects;
- incorrect data types (e.g. Text, not Date)
- incorrect date formats.
BTW, since you are using a date format different to the US, you might
find
this article helpful:
International Date Formats in Access
at:
http://members.iinet.net.au/~allenbrowne/ser-36.html
There is no time information on either date fields.
I've got the right result records with clear date, eg 16-Nov-04,
however,
whose records with date such as 12-Nov-04 may be missing.
:
I've two table, say table1 and table2, and they have date type
field
[date1]
and [date2] respectively. They are in Medium Date format. I've
tried
to
loop
through the table1 to find records in table2 by using a combination
of
conditions with matching of [date1] to [date2]. Some expected
records
were
missed at the result and it seems to be the date format problem.
I've
tried
to change the date fields in Long Date format, but it didn't work.
Does
anyone tell me how to fix the problem. Thanks