Like this
select * from People
where (month(birthday)=month(sta
Main Topics
Browse All TopicsHi,
i have a list of people with their birthdays, and i want to be able to run a query to select all the birthdays that will fall in a period of time (regardless of the year they were born in) using "Between [startdate] And [enddate]".
how whould i do this?
thanks,
Tim
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Sorry Tim,
I read your the title to your question too quickly, and didn't note the part about "regardless of the year". What you could do is pull the month and day out of the date for the birthday, and create a WHERE clause in which you specify that you select all birthdays with matching months and days within your given range.
Ex.
WHERE MONTH([birthday]) > 7 AND MONTH([Birthday]) < 10
You could do the same for the day as well. Hope this helps.
Mike
I would do something like Jo Shmo but I would actually use the built in date funcions a little different.
I would make a column of ther birthday this year.
bdnow:format(format([bday]
where bdnow between [Start_date] and [End_date]
HTH
Jag5x5
jagoodie Your way would work if you were only trying to do a single month otherwise you need to break it into two columns.
select * from People where month(bday) between month([Start_date]) and month([End_date]) and day(bday) between day([Start_date]) and day([end_date])
My way should add the current year to the month and day from the Birthday.
I Ran it and it worked fine here is the SQL From my Query
SELECT Bday.*
FROM Bday
WHERE (((Format(Format([Bday],"m
Jag5x5
I gues I forgot A slash in my original code it was
--bdnow:format(format([bda
where bdnow between [Start_date] and [End_date]
And should have been
bdnow:format(format([bday]
where bdnow between [Start_date] and [End_date]
Sorry
Jag5x5
timdesomere,
No comment has been added lately (150 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question.
RECOMMENDATION: Accept jagoodie's Comment as Answer
Please leave any comments here within 7 days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Thanks,
nexusnation
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: mchynowethPosted on 2002-12-09 at 06:58:58ID: 7554233
Change the query view to "SQL View" and add the "WHERE" statement shown below (putting in the appropriate fieldnames for you DB.
WHERE [Birthday] > [StartDate] And [Birthday] < [EndDate]