Microsoft Access - Calculating "Units Per Hour" in MS Access 2007

Asked By Tim McNeill on 22-Sep-10 05:00 PM

I am in the process of building several different reports from an Access DB. I need to be able to calculate the UPH for a production user. The formula that I have tried to use (which doesn't work properly) is...

[TotalUnits] / [EndTime] - [StartTime]

Any suggestions will be welcomed.


Tim
Sundarasegaram Veerakuddy replied to Tim McNeill on 24-Sep-10 06:30 AM
Hi Tim,

UPH should be Total Units / Total Hours of work

Not sure but is that just the Operation Sequence being used in your formula?! If so, you may correct it similar to below:

[TotalUnits] / ([EndTime] - [StartTime])

Also, if the EndTime and StartTime columns are in DateTime type, then the value you get for (EndTime - StartTime) will not be Hours. It might be the least component (probably seconds). Please check.
Matthew Johnson replied to Sundarasegaram Veerakuddy on 24-Sep-10 03:49 PM
Tim, in going with what SV said, instead of just subtracting the two times, you might try the DateDiff function.
Tim McNeill replied to Matthew Johnson on 28-Sep-10 07:07 PM
Thanks for the suggestions... For some strange reason my results are still getting skewed.
I will reply back with a better example of what I am seeing.


Thanks,

Tim