Time Code - how can I get delta hours using Access?

solorx7

New Member
Joined
May 27, 2004
Messages
3
I'm trying to calculate work hours between 2 different time stamps. I need it to calculate the total time elapsed, based on an 8 hour shift per day. For Example:

Monday at 8:00 am to Wednesday at 8:00 am would be 16 hours.

I've got a table that converts calendar days to work days, but I can't get the difference calculation to recognize the number of days. For the example above I keep getting 0 hours. It's like the time calculation is stuck on a 24 hour cycle without recognizing the number of days.

I can make this calculation work in excel with the following formula:
(Work Days) + (2nd time stamp) - (1st time stamp), or for the example above (2) + (8:00:00) - (8:00:00) = 16 hrs. Work days is a whole integer, and the time stamps are hh:mm:ss It also gets screwed up in excel when the 2nd time stamp happens to be earlier in the day than the 1st time stamp.

There's got to be a way to make this work in Access. I'm stumped.

Thanks in advance
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,221,699
Messages
6,161,367
Members
451,700
Latest member
Eccymarge

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top