Results 1 to 3 of 3
  1. #1
    sai_rlaf is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    44

    Date between Criteria

    In design view i created a query Between [Start Date] And [End Date].

    However today I noticed it doesn't seem to be inclusive.

    For instance today I searched for 07/19/2011 to 07/19/2011, and should have had 150 items, however, there were 0. I then tried 07/19/2011 to 07/20/2011 and then they showed.



    Is there a work around? I think the problem is the time is included with my source data but I don't know how to work around it other than always going a date greater than i want.

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    If time is included then if you use between 07/19/2011 and 07/19/2011 then you are essentially saying:

    Between 07/19/2011 12:00:00 AM And 07/19/2011 12:00:00 AM

    which isn't going to give you much of anything unless something happened at exactly 12 midnight.

    So when using time, you can use

    Between [Start Date] And [End Date] + #11:59:59 PM#

    so that it gets the entire time frame.

  3. #3
    sai_rlaf is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    44
    I tried that and I got the following error message.

    "This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."

    Any thoughts on whats wrong?

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

Similar Threads

  1. >Date() criteria
    By BED in forum Queries
    Replies: 3
    Last Post: 12-15-2010, 03:29 AM
  2. Criteria for date due
    By Desstro in forum Queries
    Replies: 4
    Last Post: 11-30-2010, 12:54 PM
  3. Query Date Criteria
    By svanicek in forum Access
    Replies: 1
    Last Post: 07-09-2010, 11:13 AM
  4. Date/Time Criteria
    By KWarzala in forum Queries
    Replies: 3
    Last Post: 06-04-2010, 07:08 PM
  5. Date Criteria
    By tcollins02 in forum Queries
    Replies: 1
    Last Post: 09-09-2008, 08:27 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