Results 1 to 2 of 2
  1. #1
    esh112288 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    14

    Query for Specific 24 hour time period

    Hello,



    I'm looking to write a query that, when run, automatically pulls all records created between 6:00am yesterday and 6:00am today. All records do have a date/timestamp field that is populated when the record is created. I currently have:

    Code:
    Between Date()-1 and Date()
    This does not cover the 6am piece of the query.

    Thanks in advance.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Try

    Between Date()-1 & " 6:00am" And Date() & " 6:00am"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. How do I store a period of time
    By OscarCat in forum Access
    Replies: 2
    Last Post: 06-10-2012, 05:08 PM
  2. Set Database to Expire in time period
    By robsworld78 in forum Access
    Replies: 12
    Last Post: 06-07-2011, 06:54 AM
  3. Time minus one for hour.
    By brianb in forum Queries
    Replies: 2
    Last Post: 03-09-2011, 11:02 AM
  4. Round up time half an hour
    By JBM18 in forum Queries
    Replies: 2
    Last Post: 12-09-2010, 11:56 AM
  5. [Access 2003] Displaying 24 Hour Time
    By Trainman in forum Access
    Replies: 4
    Last Post: 03-18-2009, 06:34 PM

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