By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,688 Members | 1,888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,688 IT Pros & Developers. It's quick & easy.

Query Records from a specific Date Range

P: n/a
I have a database that I would like to query for a specific date
range.

I want to create a report based on this query that will pull any
records from the last 7 days.

Is this possible? Can someone tell me how it is done?

Thanks.
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Use the Between ... And operators on the dates. Something like...

Between #1/1/04# And #5/31/04#

To return values from first of the year thru end of May.

You can also use the Date() function to reference the current date.

Between #1/1/04# And Date()

To return values year to date.

Type these into the criteria row of the QBE window.

- Jim

On 29 Jun 2004 16:03:41 -0700, tw******@eatel.net (Terry) wrote:
I have a database that I would like to query for a specific date
range.

I want to create a report based on this query that will pull any
records from the last 7 days.

Is this possible? Can someone tell me how it is done?

Thanks.


Nov 13 '05 #2

P: n/a
Hi Terry,

I think that using:
" >DateAdd("d", -7, Date())"
In the Criteria row of your query should do the trick.

SELECT YourTableName.*
FROM YourTableName
WHERE (((YourTableName.YourDate)>DateAdd("d",-7,Date())));
--
HTH,
Don
=============================
Use My*****@Telus.Net for e-mail
Disclaimer:
Professional PartsPerson
Amateur Database Programmer {:o)

I'm an Access97 user, so all posted code
samples are also Access97- based
unless otherwise noted.

Do Until SinksIn = True
File/Save, <slam fingers in desk drawer>
Loop

================================

"Terry" <tw******@eatel.net> wrote in message
news:64**************************@posting.google.c om...
I have a database that I would like to query for a specific date
range.

I want to create a report based on this query that will pull any
records from the last 7 days.

Is this possible? Can someone tell me how it is done?

Thanks.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.