Date/Time Criteria for a Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Midsy
    New Member
    • Mar 2008
    • 2

    Date/Time Criteria for a Query

    I simply want the Criteria code to have a query show data that is more than one year old.

    Simple enough in Excel
    =NOW()-365
    but
    Data()-365
    does not work in MS Access

    Thank you for the assistance
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    Hi midsy
    NOW()-365 works in access also
    In your query, just put in the criteria for the column where it applies

    Comment

    • FishVal
      Recognized Expert Specialist
      • Jun 2007
      • 2656

      #3
      DateAdd("yyyy", -1, Date())
      Is more strict method to get a date one year ago.

      Regards,
      Fish

      Comment

      • zoeykids
        New Member
        • Mar 2008
        • 1

        #4
        Date()-365
        or
        Now()-365

        in your query will return records exactly 1 year old

        Try:

        <date()-365

        or

        <now()-365

        for all records less than 1 year old.

        Comment

        • Midsy
          New Member
          • Mar 2008
          • 2

          #5
          Thanks muchly - have a great week

          Comment

          Working...