1st month, 2nd month, 3rd month... 
Author Message
 1st month, 2nd month, 3rd month...

Hi Dave,

MonthsOldOfCheck: DateDiff("m",DateAdd("d",0,"1/1/" &
Year(DateAdd("d",-1,[CutOffDate]))),[DateToCheck])

Where [DateToCheck] is the date in the past
and
[CutOfDate] is the date of "the first of the month for the month you
are  excluding".

ie
[CutOffDate] is 4/1/96, the [DateToCheck] has 2/12/96
the response is
2 months

Quick fix which can be modified by checking against the last end of the
month, and perhaps not forcing the month to start on the first day of
the month.

Bye


Quote:

> Does anyone know an SQL statement or a function which will determine the
> nth month back from a given date? for example a record with a record
> with a "recruited" date of 2/22/96 is in the "12th month" of activity
> today. a "recruited" date of 1/22/97 is in the "2nd month" of activity
> today. does Access have a function which calculates the number of months
> from a date?

> PS: i'm using Access v 2.0

> Thanks for any tips

> Dave



Fri, 06 Aug 1999 03:00:00 GMT  
 1st month, 2nd month, 3rd month...

Does anyone know an SQL statement or a function which will determine the
nth month back from a given date? for example a record with a record
with a "recruited" date of 2/22/96 is in the "12th month" of activity
today. a "recruited" date of 1/22/97 is in the "2nd month" of activity
today. does Access have a function which calculates the number of months
from a date?

PS: i'm using Access v 2.0

Thanks for any tips

Dave



Fri, 06 Aug 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can Access 7.0 determine the 1st Tuesday of a Month or 2nd Thursday of a Month

2. Grouping a report by month - but not from 1st-1st

3. Missing Months in Day/Week/Month view.

4. outlook 2k monthly cal next month this month option

5. Month name in Month view

6. Sorting Excel files by day of month and month name

7. Formula to add one month each month

8. Build some code to take time data for one month, and populate it accross all months

9. date function in excel database which provides a period between one month and another month

10. Finding the Max value for Rolling 12 month period based on input of current month


 
Powered by phpBB® Forum Software © phpBB Group