Results 1 to 3 of 3

Thread: Querying Dates

  1. #1
    Join Date
    Jan 2004
    Posts
    7

    Unanswered: Querying Dates

    I need to query past due records, each query i would like to show records that are 30, 60, 90, and over 120 days past due.Each in seperate queries so i can do a mail merge. Past due being the date of service [DATE]. NOT todays date. I just want the simplest way possible. I have tried calculated fields on the form--not a good idea. I have tried different date formats: =DateAdd("d", 30, [Date])--that i used in my Past Due Accounts Query--didnt work. I dont know what to do. Can anyone help? I am using access2000. I certainly appreciate any ideas!!! Thanks

  2. #2
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    421
    Never ever use Date or any other access reserved word in a table/field/query or anything, this will lead you into trouble....

    how about
    >=dateadd("D",30,[date]) and < dateadd("D",60,[date])

    or:

    Expr1: [date]-Date()

    Between 30 and 59

    Regards

  3. #3
    Join Date
    Jan 2004
    Posts
    7
    Originally posted by namliam
    Never ever use Date or any other access reserved word in a table/field/query or anything, this will lead you into trouble....

    how about
    >=dateadd("D",30,[date]) and < dateadd("D",60,[date])

    or:

    Expr1: [date]-Date()

    Between 30 and 59

    Regards

    THANK YOU! That helped out so much. I used the Expr1, except [date]-date() issued a negative number, so i switched the two around and it worked! Now i can move on. Regards to you also.

Posting Permissions

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