Results 1 to 4 of 4
  1. #1
    maxmekk is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2014
    Posts
    2

    query time

    Hi



    When trying to query specific time interval I seem to fail. I hope some you guys maybe have a good suggestion on this.

    I store information on date and time in the same field:

    19.01.2014 19:42:00
    19.01.2014 20:35:00
    19.01.2014 23:36:00
    20.01.2014 03:30:00

    I would like to query for all times between 00:00:00 and 06:00:00

    between #00:00:00# and #06:00:00#

    seems not to be working

    Any suggestions?

    Sincerely

    Max

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You can create a "helper" calculated field which pulls off just the time piece of the date/time field, i.e.
    Code:
    MyTimePart: TimeValue([MyDateTimeField])
    Then, you can use the Criteria on this "helper" field:
    Code:
    Between #12:00:00 AM# And #6:00:00 AM#

  3. #3
    maxmekk is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2014
    Posts
    2
    Will it work with European time standard... 24 hours?

    Max

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    It should. You might just need to change your Criteria to what you had originally.

    I had actually entered the Criteria as you originally set it:
    Code:
    Between #00:00:00# and #06:00:00#
    and it automatically changed it to what I posted.

    It might just be a regional setting thing, but I think it should work either way.
    Of course, there is an easy way to find out, try it and see what happens!

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

Similar Threads

  1. Replies: 5
    Last Post: 10-22-2013, 01:00 PM
  2. Replies: 42
    Last Post: 03-01-2013, 06:58 AM
  3. Replies: 3
    Last Post: 01-01-2013, 06:22 PM
  4. Replies: 2
    Last Post: 05-27-2011, 05:55 AM
  5. Time Query
    By kbsudhir in forum Queries
    Replies: 1
    Last Post: 07-06-2009, 05:19 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