oft discussed and answered. use the search thinggy with 'birthdaty and / or birthdate. Basically usaes date serial to replace DOB year w/ current year, then see if difference is within interval (day/week/month).
MichaelRed
m.red@att.net
There is never time to do it right but there is always time to do it over
BCarruth
This is one of the FAQs that I think will help you!
Select birthdays within the next 30 days ...
faq181-1374
As usual, there is more than ine way to skin a cat ... this select statement can be pasted straight into QBE sql but do not forget to change table (Employees) and field name (Birthdate) ...
SELECT Employees.Birthdate,
Int((Now()-[birthdate])/365.25) AS Age,
[Birthdate]+((Int((Now()-[birthdate])/365.25)+1)*365.25) AS NextBirthday,
(Int((Now()-[birthdate])/365.25)+1) AS AgeNextBirthday, [Age]+1 AS Next
FROM Employees
WHERE ((([Birthdate]+((Int((Now()-[birthdate])/365.25)+1)*365.25)) Between Now() And Now()+30));
NOTE : the WHERE statement is exactly the same as the NextBirthday line.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.