Query of Date/Time Field Problematic

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

I am prompting the user for a specific date. The problem
is that in the original table of info, the date/time field
in question includes (unfortunately) a time of day. How
do I retrieve all records, regardless of time of day, for
the specific date entered by user?? Thanks in advance for
your time.
 
Where DateValue([DateTimeField]) = [Enter Date]
I actually prefer to enter a date in a form control and use that rather than
a parameter prompt.
 
A couple of ways.

Simplest: Use the DateValue function to trim the time off the date file.

Slightly more complex, but probably faster is to use criteria like

Field: SomeDateField
Criteria: >= [Specify Date] and < ([Specify Date] + 1)
 
I tried these ideas and get one of two error messages:
1= Invalid syntax
2= Expression too complex....etc.
I'm still trying....got any more ideas??
Thanks
-----Original Message-----
A couple of ways.

Simplest: Use the DateValue function to trim the time off the date file.

Slightly more complex, but probably faster is to use criteria like

Field: SomeDateField
Criteria: >= [Specify Date] and < ([Specify Date] + 1)

I am prompting the user for a specific date. The problem
is that in the original table of info, the date/time field
in question includes (unfortunately) a time of day. How
do I retrieve all records, regardless of time of day, for
the specific date entered by user?? Thanks in advance for
your time.
.
 
Back
Top