date range

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

Guest

How do I capture records that include the last 12 months? Thanks for your
help.
 
How do I capture records that include the last 12 months? Thanks for your
help.

For records between 7/20/2004 and 7/20/2005 (today's date)
Between DateAdd("m",-12,Date()) and Date()

For records between 7/1/2004 and 6/30/2005 (the last day of the
previous month)
Between DateSerial(Year(Date())-1,Month(Date()),1) and
DateSerial(Year(Date()),Month(Date()),0)

For records from 7/1/2004 through 7/20/2005
Between DateSerial(Year(Date())-1,Month(Date()),1) and Date()
 
Susie said:
How do I capture records that include the last 12 months? Thanks for
your help.

What have you tried and what were the results?

Note: often Access likes to see dates as #7/20/2004# so it knows the number
is a date.
 
Hi,

This is what worked for me:

Between #StartDate# and #EndDate#

Diana
 

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

Similar Threads

Date ranges 3
Date Guru 4
Query to sum between specific date And Date() 0
The Last of Us - Part I (PC) 6
DateDiff on blank fields? 4
Date search query 0
Dlookup 7
date restrictor questions 1

Back
Top