April 9, 200124 yr 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
April 10, 200124 yr Duration = (EndDate - StartDate)*86400 + EndTime - StartTime FullDays = Int(Duration / 86400) Hours = Mod(Duration, 86400) / 3600
April 23, 200124 yr Author 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?:
April 23, 200124 yr 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
April 25, 200124 yr Author 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
April 26, 200124 yr 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.
Create an account or sign in to comment