Results 1 to 4 of 4

Thread: Sorting Dates

  1. #1
    Star Lounger
    Join Date
    May 2003
    Location
    Kansas City, Kansas, USA
    Posts
    76
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ok, I have a table that is called Census Letter Details, the users create a new record for each year that they do a census letter. I am trying to create a query that shows only the last two years of records. Any help??

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='RFlaggard' post='765261' date='13-Mar-2009 17:01'][/quote]
    In the criteria of the date field use :
    Between Date() And DateAdd("yyyy",-2,Date())
    Francois

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='RFlaggard' post='765261' date='13-Mar-2009 17:01'][/quote]
    If you want the two complete years before this year, use in the criteria of the date field :
    Between DateSerial(Year(Date())-2;1;1) And DateSerial(Year(Date())-1;12;31)
    Francois

  4. #4
    Star Lounger
    Join Date
    May 2003
    Location
    Kansas City, Kansas, USA
    Posts
    76
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you! You are always a great help!

Posting Permissions

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