Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding elapsed time values

Status
Not open for further replies.

wfweirich

Programmer
Sep 10, 2001
21
US
I have an Access 97 table that stores elapsed time for a number of dial settings, these records are written to the database once a shift. These values are stored in hh:mm:ss format. I need to add these together for a date range. I know how to isolate just the records that I need. I need help totaling the time fields. I thought about converting the hh:mm:ss value to seconds, adding them all together and then converting that value back to the original format. The field is a Date/Time field in the table with a hh:mm:ss format. I tried DSum, thinking that Access would recognize the format and add them accordingly, but it did not work. I just feel that there has got to be an easier way to do this. Thanks in advance for your help.
 
Some uncertainty here. Date type is a specific numeric format for Ms. A., while the "hh:mm:ss" suggests a text field. It is an important distinction. If the field is TRULY Ms. A. Date type then simple addition works - at least as far as summing the elapsed times. If the field is of some other type, you need to do the parsing and conversion of the sub field components. In the latter instance, it would be useful to (also) do some validation on the subfields as you paresd them.

In either case, you will need to recast (format) the results to achieve the "look" of an elapsed time, as the results will definitly be 'just' a number.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top