Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Between dates

Status
Not open for further replies.

cheyenne2002

Instructor
Jul 26, 2005
229
US
I have a table with member birthdates (6/1/1956) and also their spouses. I need to pull out those with birthdays in May and June only.

Any suggestions on how to do this in a simple query. I thought I knew how but my attempts did not work.

I tried doing a Between[Startdate] and [Enddate] but realized that the data has been put in including the year. I even tried using 6/1/1900 and 7/31/2007 to see if it would work, but it gave me everyone.

I also tried sorting thinking I could just copy and paste the ones I wanted, but it sorted them by the year and not the month.

I don't need anything elaborate I just need the data pulled.

Thanks for looking at my problem.
Sharon
 
How about Month.

[tt]Select ID, SName From tblTable Where Month(BDate)=[Enter Month No: ])[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top