=Date() Problem

J

Justin

I have a query and want to return records only with today's date. However,
when i use =Date() in the criteria field i only get one result (i have three
with the same date right now and one with different date) any suggestions?
 
J

John W. Vinson

I have a query and want to return records only with today's date. However,
when i use =Date() in the criteria field i only get one result (i have three
with the same date right now and one with different date) any suggestions?

Correct the error in your query, or in your data.

Since we can't see either, you'll need to post some more information!

At a GUESS, your table's date field contains both a date and time component,
and you'll need a query such as
= Date() AND < Date() + 1

to get all records from #2/3/2010 00:00:00# through #2/3/2010 23:59:59#.
 
K

KARL DEWEY

You probably have time with those dates so they would look like this --
40212.6328703704 and =Date() will be 40212.0
So you can use =Date()+.999999
Or remove the time from your field -- Int([MyDate])
 

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