I have an Invoices table with a Date/Time field. I want to write a query that returns all invoices for a certain day.
The problem I’m having is that when I filter the query by a particular date (such as 04/30/2011), no records are being returned. My suspicion is that Access is trying to return records that are an EXACT MATCH of 04/30/2011.
What I want is a query that returns all invoices that occur ON 04/30/2011 regardless of what time they occur. Basically, I want Access to care about the day but not the time.
Is there any documentation on how to do this? I sure can’t find any. I’m using Access 2010. Thanks!
It is about the datatype, I assume your date is stored in a
datetimefield. This will store the time as well and if no time is specified will default to midnight. I ususally use theBETWEENfunction to do this:Because both dates will be at midnight, you will get the results from April 30.