Results 1 to 3 of 3
  1. #1
    wolfm is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2013
    Posts
    93

    Date query not working

    My date range criteria is not pulling records correctly.


    My field is [First Move-in Date]
    I want to return records with [First Move-in Date] as today and all dates up to seven days in the past.
    I have tried the below criteria, and although they all work, none of them pull also todays date. They all pull from yesterday and 7 days prior.
    Seems like these should work, but don't.

    Between Date() And Date()-7
    >=Date()-7 And <=Date()
    Between Date()-7 And Date()

    Thank you!!

  2. #2
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    Simple answer is that you [First Move-in Date] have hours, minutes, and seconds data on it.

    If you strip them out, the criteria that you have will work.

  3. #3
    wolfm is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2013
    Posts
    93
    Yes, the excel spreadsheet I import does contain times, also. I don't really need the times, so I can delete them.
    When I tried that, it worked fine.

    Thank you!
    Quote Originally Posted by lfpm062010 View Post
    Simple answer is that you [First Move-in Date] have hours, minutes, and seconds data on it.

    If you strip them out, the criteria that you have will work.

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

Similar Threads

  1. Changing Date Formats in SQL Query Not Working
    By Markb384 in forum Queries
    Replies: 9
    Last Post: 05-02-2014, 08:55 AM
  2. Replies: 1
    Last Post: 11-26-2013, 09:25 AM
  3. Replies: 6
    Last Post: 02-28-2013, 05:38 PM
  4. If then using a date not working
    By epb in forum Programming
    Replies: 4
    Last Post: 09-25-2012, 09:58 AM
  5. Replies: 3
    Last Post: 09-19-2012, 08:59 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