Results 1 to 9 of 9

Thread: Query help

  1. #1
    Join Date
    Dec 2006
    Posts
    5

    Unanswered: Query help

    hello

    i have a table with all student information on it including the date of birth

    how can i make a query which enable me to find the students who have a birth day this week




    thanx

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    What do you mean by "this week"? Do you mean a birthday within the coming seven days, or the current week starting with sunday?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Dec 2006
    Posts
    5
    i mean the current week starting from sunday

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Try:

    datepart("ww", [yourDateFieldGoesHere]) = datepart("ww", now())
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Dec 2006
    Posts
    5
    it didn't work

    i have a table with the following field on it
    surname, forename, date_of_birth

    i want to show the students who has their birth day this week which start with sunday


    appreciate ur help

  6. #6
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    what didn't work? What is the exact query you used?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  7. #7
    Join Date
    Dec 2006
    Posts
    5
    i'm using design view to creat my query

    so

    i need to know the criteria that i have to put in order to give me the students who have birth day this week

    thanx

  8. #8
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Try using the Access Help file with regard to the "datepart" function I referred to in my first answer.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  9. #9
    Join Date
    Dec 2006
    Posts
    5
    ok ok

    it was my mistake

    this query worked for me

    datepart("ww", [yourDateFieldGoesHere]) = datepart("ww", now())

    thanx alot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •