Results 1 to 6 of 6

Thread: one year ago

  1. #1
    Join Date
    Jul 2004
    Posts
    214

    Unanswered: one year ago

    All,
    Im using Access 2003. I have a table I need to pull out records with a current date and one year ago or more. How do I do this. Between doesn't work because it give me dates less than one year.
    Thanks

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Pseudo code
    Code:
    WHERE  yourDate >= DateAdd("yyyy", -1, Now())
    George
    Home | Blog

  3. #3
    Join Date
    Jul 2004
    Posts
    214
    Thanks for responding. This gives me dates less than one year i.e. 10/2/2007 Do I need to reference the month too?

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Post your full SQL
    George
    Home | Blog

  5. #5
    Join Date
    Jul 2004
    Posts
    214
    OK

    Code:
    SELECT ACHItemsWClosedAccts.Client, ACHItemsWClosedAccts.Acct, ACHItemsWClosedAccts.DateClosed
    FROM ACHItemsWClosedAccts
    WHERE (((ACHItemsWClosedAccts.DateClosed)>=DateAdd("yyyy",-1,Now())))
    ORDER BY ACHItemsWClosedAccts.DateClosed DESC;

  6. #6
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    You have this on multiple sites. This still has the error we've already addressed elsewhere, > instead of <.
    Paul

Posting Permissions

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