Results 1 to 3 of 3
  1. #1
    ant123 is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    14

    Search for records using two date feilds that are within 48 hours of one another

    Hi All,

    Sorry to pester you again!

    I want to create a query where I search by two 'date' feilds. I want to pull out all records where these two feilds are within 48 hours of one another. This is based on hospital data where the first date is the date of arrival in the emergency department and the second date the date of admission to the hospital. So a patient may arrive on 23rd Jan (23.00pm) and be admitted on 24th Jan (02.00am).



    Would be really grateful for any suggestions!

    Thank you :-)

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Use DateDiff function to calculate elapsed time in hours and apply filter criteria to that constructed field.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ant123 is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    14
    Hi June7 - thanks very much for your help. I am just trying to do what you suggested. I will let you know how I get on :-)

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

Similar Threads

  1. Replies: 14
    Last Post: 09-11-2013, 01:10 PM
  2. Sum hours between anniv date and end date
    By rworthy in forum Queries
    Replies: 6
    Last Post: 06-07-2013, 06:34 PM
  3. Replies: 6
    Last Post: 03-15-2013, 11:04 AM
  4. Replies: 1
    Last Post: 08-08-2012, 01:42 PM
  5. Replies: 4
    Last Post: 08-06-2012, 10:25 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