Parameter query using 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!!
 
D

Douglas J. Steele

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top