Birthday

B

Beth

In my database, I track student birthdates. I would like to be able to pull
a list of all students that are going to have a birthday between 2 given
dates, regardless of the year of their birth.
In other words, everyone that is going to have a birthday between June 15th
and July 15th, but the dates are specified by the end user on a parameter
form.
I tried using a formula to pull the day and month from the birthdate and
concatenate it with the year from the Date() formula. It works except that
it is recognized as text, not as a date, so October, November, and December
are between January and February.
I tried using the FormatDateTime, and it still didn't work.

I am looking for suggestions on how to do this.

Thanks,
Beth
 
D

Douglas J. Steele

You can use DateSerial(2007, Month([DOB]), Day([DOB]) to the date this year
on which they're going to have their birthday.

You can also use Format([DOB], "mmdd") and look for values between "0615"
and "0715"
 
K

KARL DEWEY

Open your query in design view and edit a field like this --
Birthday: Format([birthdates], "mmdd")

In the criteria put this ---
Between Format(CVDate([Enter beginning like '1/5/' - Mon/Day/] &
"2222"),"mmdd") And Format(CVDate([Enter ending like '1/5/' - Mon/Day/] &
"2222"),"mmdd")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top