If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date Querry
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? |
#2
|
|||
|
|||
Date Querry
Assuming a date field, "...WHERE Month(BirthDay) = 1"
If it's a text field, "...WHERE Month(CDate(BirthDay)) = 1" HTH jb ellis wrote: 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? -- Sam Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200601/1 |
#3
|
|||
|
|||
Date Querry
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 "jb ellis" wrote: 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? |
#4
|
|||
|
|||
Date Querry
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. -- Jerry Whittle Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "jb ellis" wrote: 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? |
#5
|
|||
|
|||
Date Querry
Had to modify because of searching multiple tables but concept worked; Thanks
"OfficeDev18 via AccessMonster.com" wrote: Assuming a date field, "...WHERE Month(BirthDay) = 1" If it's a text field, "...WHERE Month(CDate(BirthDay)) = 1" HTH jb ellis wrote: 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? -- Sam Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200601/1 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding info to query | mjj4golf | Running & Setting Up Queries | 20 | January 9th, 2006 02:29 AM |
Reports with Date Range - Errors | jwr | Setting Up & Running Reports | 12 | August 8th, 2005 12:57 PM |
Revised Date Question | Spectra | Running & Setting Up Queries | 0 | March 18th, 2005 12:19 PM |
Aggregating Date Data into Weeks and Quarters | Roger | Running & Setting Up Queries | 3 | July 11th, 2004 05:56 PM |
more dates!!! | brigid | Running & Setting Up Queries | 6 | May 26th, 2004 10:59 AM |