Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Posts
    26

    Unanswered: Calculating Time Taken

    I dont actually think I sleep any more

    Ok

    I have a table with 2 fields time logged and time closed, these fields are setup so they contain a date format such as

    dd:mm:yy hh:mm:ss

    I need to create a query where I extract all data where timetaken is less that 2hrs

    When I use excel I can do time closed - time taken and set the format as hh:mm:ss and this will get rid of the actual date part, but i'm not sure what to do in access.

    Again any suggestions would be great.

    Can you create extra fields and have a formula in that???

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Read this document...it may help.
    Attached Files Attached Files
    Environment:
    Self Taught In ALL Environments.....And It Shows!


  3. #3
    Join Date
    May 2005
    Posts
    119
    datediff("h",[startdate],[stopdate]) will give you the difference in hours..
    You may put in the criteria of <=2 in a query to pull your report.

    You can replace the "h" with any of these:
    Setting Description
    yyyy Year
    q Quarter
    m Month
    y Day of year
    d Day
    w Weekday
    ww Week
    h Hour
    n Minute
    s Second

Posting Permissions

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