Query Criteria with dates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vkong85
    New Member
    • Jun 2007
    • 24

    Query Criteria with dates

    I am trying to write a query that will only display records between today's date and 30 days.

    I've tried several different ways but nothing seems to work. Currently in the criteria of the date column in the query i have the following code:

    Between (Date()) And (DateAdd("m",1, Date()))

    The logic behind this was that it would take all records between today's date and today's date +1. Thats the latest I've had. It does sort somewhat but I'm still getting records from years past. I'm not sure what to do now.
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Originally posted by vkong85
    I am trying to write a query that will only display records between today's date and 30 days.

    I've tried several different ways but nothing seems to work. Currently in the criteria of the date column in the query i have the following code:

    Between (Date()) And (DateAdd("m",1, Date()))

    The logic behind this was that it would take all records between today's date and today's date +1. Thats the latest I've had. It does sort somewhat but I'm still getting records from years past. I'm not sure what to do now.
    Try this ...

    Between Date() And Date()+30

    Comment

    Working...