Access query date is not returning all results can is there way to adjust

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PakerBaker
    New Member
    • Nov 2015
    • 3

    Access query date is not returning all results can is there way to adjust

    Hi there
    Programmers have made a change in the database format for dates. This is causing query to not pull all the results.
    Before the date format was mm/dd/yyyy: 00:00:00:000
    to mm/dd/yyyy 05:00:00:000. This is causing my pre-existing access query that is either simple prompt to users to enter start date and enter end date. Where they enter 04/01/2015 and 04/30/2015 or some of the queries have date specified as
    between #04/01/2015# and #04/30/2015#.
    the queries are not picking up transactions dated 04/30/2015 05:00:00: 000
    If I change the query to be < #5/1/2015 will that work ? I do not want to pick up transactions for the next month
    is there another way I can handle this date problem?
    thanks in advance for any replies
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Change it to #04/30/2015 5:00:00#

    Comment

    • mbizup
      New Member
      • Jun 2015
      • 80

      #3
      BETWEEN includes the 'endpoints'.

      Changing the query to use the < operator instead of BETWEEN will get everything up to but not including the endpoint, so

      [YourDateField] >= #04/01/2015# AND [YourDateField] <#04/30/2015#

      Should get everything from #04/01/2015 00:00:00# to the very end of 4/30/2015 (but not including 5/1), regardless of time stamp.

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #4
        From MVP Allen Browne: http://allenbrowne.com/casu-08.html

        Comment

        Working...