Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Location
    Ohio, USA
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a database with a start time, date, and hours to be worked. I'm trying to calculate end time. I've used End: DateAdd("h",[hourswk],[datewk]+[timest]) which works fine until someone works half hours, 8.5 or 10.5 and then all I get is 8 or 10 hours added. I've tried it with the "n" but then it add 8.5 minutes. I've tried it differently with a /60 but then it messes up the date part. What I want in is end: 6/23/2009 9:00:00 PM.

    Suggestions?
    Thanks for any help

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    DateAdd only works with whole multiples of the interval. Try the following instead:

    End: [datewk]+[timest]+[hourswk]/24

    assuming that hourswk is the number of hours worked.

  3. #3
    New Lounger
    Join Date
    Mar 2002
    Location
    Ohio, USA
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks again Hans, you again worked your magic. I didn't thing 3 fields so different could be joined that way.

Posting Permissions

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