>In my application, I will have a field in an Access datatbase that will store the time it takes for a user to complete an external process. The duration will be presented from different devices via the serial port, and will come in different formats (ie.. HHMMSS....HMMSS). My question is, what will be the best format to place this duration time into, in the database, and what is the best method to add all of a users duration times together, for a total time and avg time?
>
>
>Randy
You can store this on a date/time type field on an Access mdb, you just need to add the date. If the date is the same (and using VB6) you can use direct date arithmetic to calculate the time elapsed between two datetime values and then format it like so:
Format$(StartDate - EndDate, "hh:mm:ss")
If it falls on a different date, you can probably use a combination of DateDiff() & DateAdd(). Although for something like this you would probably need to calculate the necessary intervals separately (days, hours, minutes and seconds) and then construct a date var with that to feed to the DateAdd.
HTH