Viewing upcoming birthdays

spowers21

Registered User.
Local time
Today, 07:40
Joined
Mar 28, 2002
Messages
49
I have a simple db in which I am compiling profile information about customer contacts. General stuff like name, address, etc. and Birthday. I want to write a query that will show me anyone who has a birthday in the next 30 days. The info in the table is date/time and is formatted as short date. I am using between date() and date()+30 in the query but it doesn't seem to work.
I need to pull only the month and day of the birthday and compare that to the month and day of todays date plus the next 30 days. Anyone have any suggestions? Thanks.
 
There have been a couple of Age Calculation functions posted to this forum - a search of them would be a great start.
 
Thanks for your post, I have searched and not found the answer I am looking for. I am not necessarily looking for someone's age as much as I am filtering someone's birtdate to see if they have one coming up.
 
You say you are storing their birthday.

Do you mean their date of birth or just their birthday for this year?

If you store their date of birth then you can effectively calculate their birthday for the year using this expression to create a calculated query field:

Birthadys: DateSerial(Year(Date()), Month([DOB]), Day([DOB])

where DOB, of course, is the date of birth field.

Then, this way you will have the birthdays for the current year, and every year you want to run this query in.

Then the criteria, on the calculated field, would be:

Between Date() And DateAdd("d", 30, Date())
 

Users who are viewing this thread

Back
Top Bottom