Results 1 to 4 of 4
  1. #1
    Guitarzan is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    15

    Criteria to return results from last 30 days

    I have a date field I'm querying and want to return results from the last 30 days.



    I originally tried to use this criteria: >=DateAdd("d",-30,Date())

    but my field contains dates in the future too but I only want it from 30 days ago until today. What is the criteria I can use to accomplish this?

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Try:
    Code:
    Between DateAdd("d",-30,Date()) And Date()

  3. #3
    Guitarzan is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    15
    Quote Originally Posted by JoeM View Post
    Try:
    Code:
    Between DateAdd("d",-30,Date()) And Date()
    Worked perfectly. Thank you!

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You are welcome!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 04-04-2017, 02:50 AM
  2. Replies: 4
    Last Post: 03-23-2012, 01:18 PM
  3. Replies: 9
    Last Post: 03-09-2012, 02:55 PM
  4. Replies: 4
    Last Post: 11-10-2011, 03:16 PM
  5. Return values from five days ago
    By reidn in forum Queries
    Replies: 3
    Last Post: 08-02-2011, 11:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums