Lee J Posted April 9, 2001 Posted April 9, 2001 Similiar to many other posts we to have Start Time/End Time Start Date /End Date. Our problem is as follows Need to calculate the Date duration but have to make sure that the Time end hasn't gone over a day. We run a shift system so some users Login 10:00pm and finish 6:00am following day. need assistance on the best way to perform the calculation and return the following answers Number of hours worked. number of days worked (as the shift may take over the end run of the project
BobWeaver Posted April 10, 2001 Posted April 10, 2001 Duration = (EndDate - StartDate)*86400 + EndTime - StartTime FullDays = Int(Duration / 86400) Hours = Mod(Duration, 86400) / 3600
Lee J Posted April 12, 2001 Author Posted April 12, 2001 Thanks for the assistance, it seems to be working fine.
Lee J Posted April 23, 2001 Author Posted April 23, 2001 Just when you thought it was safe to go back..... I now have another prob. My summary field gives the wrong answer Summmary field totals the TimeTotal field which is a calulation number field. If I have the values 60,5,5,5 the sum answer should be 1.25 instead I get 1.083333 recurring. even adjusting the Decimal place doesn't help sum calc is Sum(TotalTime) / 60 What am I doing wrong?:
LiveOak Posted April 23, 2001 Posted April 23, 2001 I have no clue why without seeing your files, but your total is only 65 minutes. My guess is something you know, ain't so! -bd
Lee J Posted April 25, 2001 Author Posted April 25, 2001 I have two DB's One for the Job Details and a Line items for all the Time entries against the job. The Sum field totals up the TotalTime in the Line Items DB via a Job Number relation. Hopefully you can see a screen shot below if I do the calculations manually I get the right answer, using the sum command It's wrong. If the screenshot didn't work mailto:[email protected] and I will send you the sample. Cheers
BobWeaver Posted April 26, 2001 Posted April 26, 2001 Couldn't see your screen shot, but here's a suggestion. Check your field definitions and see if you are totalling time fields or number fields. You may need to change them to a different type.
Recommended Posts
This topic is 8670 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now