Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Sep 2001
    Location
    Stuck at work..., Missouri, USA
    Posts
    248
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have an database used in a small bookstore for sales/inventory. Punctuality was an issue, so I created a table that would time stamp when the database was opened and closed.

    I have a table that has 2 columns, both are Date/Time fields like "9/18/2009 5:15:49 PM" where one is named "Started" and one is named "Ended". If a row has a Started, it will have no Ended and vice versa.

    I need to have a query that shows the earliest Started and the latest Ended for each day. (Did they arrive on time and did they leave early?)

    Any suggestions?

    Thanks!
    <font face="Comic Sans MS">Morgan Erickson</font face=comic>
    morgan.erickson@sprint.com
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>-From <img src=/S/flags/Colorado.gif border=0 alt=Colorado width=30 height=18> but living in <img src=/S/flags/Missouri.gif border=0 alt=Missouri width=30 height=18>...and working in Kansas.

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Create two queries. One to calculate the Min Start time by date and the other to calculate the Max End time by date. Link the two queries by date. See attached (qryMinMax shows the final results):
    Attached Files Attached Files

  3. #3
    3 Star Lounger
    Join Date
    Sep 2001
    Location
    Stuck at work..., Missouri, USA
    Posts
    248
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='mbarron' post='794299' date='21-Sep-2009 12:35']Create two queries. One to calculate the Min Start time by date and the other to calculate the Max End time by date. Link the two queries by date. See attached (qryMinMax shows the final results):[/quote]
    This worked like a charm, thanks!
    <font face="Comic Sans MS">Morgan Erickson</font face=comic>
    morgan.erickson@sprint.com
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>-From <img src=/S/flags/Colorado.gif border=0 alt=Colorado width=30 height=18> but living in <img src=/S/flags/Missouri.gif border=0 alt=Missouri width=30 height=18>...and working in Kansas.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •