Bluezman
03-19-2002, 05:38 AM
I know I've asked this question before, and I believe I'm about 75% there on getting what I need, but I'm lost as to how to get the other 25% to work out.
I have a club. Members have an "Initiation" date and can then have any number of "Out" dates for suspensions, demits, and "In" dates where they were reinstated or restored. So far, I have been able to get my queries to calculate total time "In" and total time "Out" with the help of others in this forum (thank you all again).
Given that a member has an initiation date, we can project a 25, 50 and 75 year anniversary date, as this is a simple calculation using DateAdd.
What I need to have is a way for the query to look at which anniversary date a period of inactivity applies to, i.e. before their 25 year anniversary, after the 25 but before the 50, etc.
InitDate: 1/1/1950
Suspend1: 12/31/1976
Restore1: 6/1/1977
This member has inactivity, but it wouldn't affect his 25 year anniversary, but would affect his 50 and 75 year. Using what I have been told (use the DateAdd function and add the total days to the end of the anniversary calculation) it applies the total of inactive time to each anniversary calculation regardless of when the inactivity occured.
Is there a way to check the date range and have it apply only to the anniversary it shares dates with?
I realize this probably all sounds like a jumble, but I'd be happy to explain further if needed.
Bluez
I have a club. Members have an "Initiation" date and can then have any number of "Out" dates for suspensions, demits, and "In" dates where they were reinstated or restored. So far, I have been able to get my queries to calculate total time "In" and total time "Out" with the help of others in this forum (thank you all again).
Given that a member has an initiation date, we can project a 25, 50 and 75 year anniversary date, as this is a simple calculation using DateAdd.
What I need to have is a way for the query to look at which anniversary date a period of inactivity applies to, i.e. before their 25 year anniversary, after the 25 but before the 50, etc.
InitDate: 1/1/1950
Suspend1: 12/31/1976
Restore1: 6/1/1977
This member has inactivity, but it wouldn't affect his 25 year anniversary, but would affect his 50 and 75 year. Using what I have been told (use the DateAdd function and add the total days to the end of the anniversary calculation) it applies the total of inactive time to each anniversary calculation regardless of when the inactivity occured.
Is there a way to check the date range and have it apply only to the anniversary it shares dates with?
I realize this probably all sounds like a jumble, but I'd be happy to explain further if needed.
Bluez