Parameter query using Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a problem. I have a query that prompts the user to enter a date range
for their report. I'm using Between...And... date function in the query as
the parameter. The field date is the long format e.g., 5/20/05 7:00:00 AM
so the query returns erratic results. If works fine if field format was
05/20/05.

I've tried changing the table's field format to the short format but it
doesn't work. How can I get around this? Please help!!
 
The field format just changes what's displayed: it doesn't change the
underlying value at all.

If you're using Between [Start Date] And [End Date], simply add one day to
the second date, like Between [Start Date] And [End Date] + 1

Otherwise, you could use the DateValue function around your date field to
strip off the time, but that'll be slower.
 
Back
Top