Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How would you set the criteria for a date field named EffectiveDate to limit your records to all where the EffectiveDate is greater than July 1 five years ago. I didn't want to type the criteria as 07/01/2004 because each year the criteria would need to be modified.
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You can use

    >DateSerial(Year(Date())-5,7,1)

    Year(Date()) is the current year, Year(Date())-5 is 5 years ago. This is used in DateSerial, which has syntax DateSerial(year,month,day).

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks. That worked great. I can think of so many places I can use that type of expression now that I understand how it works.
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

Posting Permissions

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