Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jan 2002
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Subtract Dates (Access 97 SR1)

    I have a date field in a table and I would like to create an expression where you subtract today's date from the date in the table and then the table shows only those records that are over 120 days old. How would I express today's date in the expression? Thanks for any help.

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

    Re: Subtract Dates (Access 97 SR1)

    You can use the function Date() in a query; this returns today's date. You could use the following expression in the Criteria line for the date field:
    <Date()-120
    or
    <DateAdd("d",-120,Date())

  3. #3
    Star Lounger
    Join Date
    Jan 2002
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Subtract Dates (Access 97 SR1)

    Thank you. That was very helpful.

Posting Permissions

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