Calculating Time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I having difficulties adding time to a report
Here is what I am trying to do
I enter a Starting Time (ex. 5:00am), then each row of the report has a product and a expected time it takes to complete this product. I want the first row to add the Expected Time + the Start Time, then have the other rows in the report to feed each others time to create a time table
It would look like this
Start Time: 5:00 a
Product 1 Expected Time 0:18.00 5:18 a
Product 2 Epected Time 0:05.00 5:23 am
Product 3 Epected Time 1:00.00 6:30 a
And so on
This is easily done with excel, but I have not figure it out in access yet.
Thanks in advance for your help
 
Chuck

If you are using the Access Date/Time field, you can't! In Access,
Date/Time stores "point-in-time" data, not duration. Your "expected time it
takes to complete the product" is a duration measure.

One approach is to use numeric data types, and store all values in the
lowest common factor (i.e., if you measure in seconds, store total number of
seconds). To do your calculations, you could then add the number of seconds
to the Date/Time value you are storing in [Starting Time], to get a
Date/Time value of the expected completion time. Take a look at the
DateAdd() function & syntax in Access HELP.

One wrinkle ... Date/Time fields store the date as a whole number and the
time as the decimal fraction (to the right of the decimal place). This
means that you'll need to convert your duration value to a "fraction of a
day" number by dividing it by the total number of units per day. For
example, if you measure in hours, you'd divide your expected duration by 24
before adding to the [Starting Time].

Wrinkle #2 ... your [Starting Time] field would need to be a Date/Time
field, and would need both a Date and a Time!
 
Back
Top