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 Past 12 Hours

    I'm trying to write a Query to pull all records added in the last 12 hours from the NOW() date and time stamp but nothing that I've tried is working. Suggestions?



    I currently have:
    Code:
     Between Hour(Now()) - 12 and Hour (Now())

  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,652
    I think you'd want:

    Between DateAdd(...) And Now()

    where the DateAdd() function would subtract 12 hours from now.
    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. Replies: 1
    Last Post: 08-08-2012, 01:42 PM
  2. Replies: 4
    Last Post: 08-06-2012, 10:25 AM
  3. Replies: 2
    Last Post: 10-08-2011, 06:33 PM
  4. Past Due Query
    By sai_rlaf in forum Queries
    Replies: 4
    Last Post: 07-06-2011, 01:53 PM
  5. Grouping hours query
    By DMP84 in forum Queries
    Replies: 0
    Last Post: 08-26-2010, 07:15 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