returning birthdays

  • Thread starter Thread starter johnc
  • Start date Start date
J

johnc

I want to run a query that returns a customers birthday.
I have the data entered as month/day/year. Does anyone
know the correct function so that it will either take the
current day or the date i enter and return the customer
with the same birthday? I can do this if i enter the
matching month/day/year however I just want to enter
month and day not year. thanks
 
John,

Make a simple select query on the table, and add two calculated fields like:

bdmonth: Month([BDate])
dbday: Day([BDate])

where I have assumed BDate to be the birthday date field.

Then, add the following criteria respectively:

Month(Date)
Day(Date)

which will return the current date's month and day, so the query will
always return customers whose birthday is today. If you omit the
criterion on the day you will get the whole month's results. It's also
easy to modify hte criteria to return records for any date (vs current
date), or even a range.

HTH,
Nikos
 
Back
Top