Date Querry

G

Guest

My db has a birthday field in short date format (mm/dd/yyyy).

How do I querry for all birthdays in say Jan, regardless of day or year?
 
O

OfficeDev18 via AccessMonster.com

Assuming a date field, "...WHERE Month(BirthDay) = 1"

If it's a text field, "...WHERE Month(CDate(BirthDay)) = 1"

HTH
 
G

Guest

Jb:
Type typing this in for the criteria......1=Month([Birthday])

This should give you all birthdays in Jan regardless of the day or year. Of
course this assumes the field name is "Birthday".

Hope this helps,
FatMan
 
G

Guest

In your query put something like the following at the top of a column:

BirthMonth:Month([birthday field])

In the criteria you would put the number 1 for Jan, 2 for Feb, etc.

This will only work IF your birthday field is an actual date/time field.
Something that looks like a date in a text field will take more work.
 

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