A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date Querry



 
 
Thread Tools Display Modes
  #1  
Old January 13th, 2006, 05:09 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default 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  
Old January 13th, 2006, 05:19 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default 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  
Old January 13th, 2006, 05:22 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default 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  
Old January 13th, 2006, 05:29 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default 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  
Old January 13th, 2006, 10:00 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 08:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.