Hi,
The format can be important for a parameter you supply, but does not
matter
for date (and time) already stored in the table, since there, it is
stored
as a number of days (and portion of day, such as 0.25 = 6:00 AM) since
30th
December 1899 (2 days later it is the First of January 1900). Since the
hour
can be stored, asking for an equality:
WHERE fieldName =#01/01/2000#
may exclude records where the date is as wanted, but with a time other
than
midnight (00:00:00).
WHERE DateValue(fieldName) = #01/01/2000#
would be safer.
Note that when using a constant date with the # # delimiters, Jet tries,
first, to give a meaning to the date as if it was in the US order:
MM/DD/YYYY, but if it fails, such as for #23/12/20#, you may get
surprises,
such as this being "understood" as 20th December 2023, or something else
(on
my PC, where my preferred format is yyyy.mm.dd, the #23/12/20# is
understood as 20th December 2023), so use the US format if you use the #
#
delimiter (there are exception to this rule, unfortunately).
Hoping it may help,
Vanderghast, Access MVP