My question was on storing a birthdate without the year. Some adults don't care to give their birthyear, so all we have is MM/DD in DateOfBirthColumn. For the kids (who aren't so particular), we want to store MM/DD/YYYY in DateOfBirthColumn so we can determine their age for placement in classes as well as printing the birthday list. So, for the adults who don't give us a birth year, I'm thinking the best thing is to store something like MM/DD/1000 or MM/DD/0001 or some obviously bogus year that is easy enough to exclude via WHERE clauses. I just have to be careful that I don't print a birthdate list showing some people born over a thousand years ago, regardless of how old they might _feel_. :)
Thanks again, Doug
A. Razzak Memon wrote:
At 07:59 PM 3/3/2005, Doug Hamilton wrote:
... we just need a list of birthdays in a date range, like who has April birthdays ...
Doug,
Here's how:
01. Keep the actual birthday in its original column
02. Now if you need to know the birthday of all kids, next month, such as March, regardless of the actual year, try the following:
Example:
SET VAR vMonth INTEGER = (IMON(ADDMON(.#DATE,1)))
SELECT LastName, FirstName FROM tablename WHERE + (IMON(DateOfBirthColumn)) = .vMonth
That should give you the list of all kids with their birthday in March.
Use that logic to achieve your goal, as above, if I understand correctly.
Hope that helps!
Very Best R:egards,
Razzak.
