Date Function

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

What is a good date function that I can use to grab the 13th month in a
period of time? In this case it would be January 06. I want this to be an
automated function so I don't have to have someone type in the date like:
between #01/01/06# and #01/31/06# Any ideas?

Thanks,
Chris
 
Between #01/01/06# and DateAdd("m",1,#01/01/06#)-1

You could link the #01/01/06# part to a field or make it a date parameter
like so:

Between [Enter Date] And DateAdd("m",1,[Enter Date])-1

BTW: You need the -1 as DateAdd would put it on the first day of the next
month.
 
So you want the month that was 13 months prior to the current month. The
criteria for that would be

Between DateSerial(Year(Date()),Month(Date())-13,1) and
DateSerial(Year(Date()),Month(Date())-12,0)

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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

Back
Top