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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Which data-type?

Status
Not open for further replies.

jgoodman00

Programmer
Jan 23, 2001
1,510
Ok, I have a datalogger, which is recording lap-times in the format of mm:ss.00 where 00 are decimals of a second.

It would appear all the standard data-types only work to hh:mm:ss. At the moment, the only solution I can think of, is to import the laptime as a string, & convert it to seconds.
e.g.
1:14.02 = 74.02

This seems very messy though. I would prefer to have a data-type which could contain the original value.


Any ideas? James Goodman MCP
 
Your problem is in part caused by the way that Microsoft represent dates/times. I don't think that this standard has enough decimal places to accommodate hundredtyhs of a sec, but you should search the help file for the spec for this data type. If it is precise enough, you could write a function to do the necessary conversion, perhaps.
 
Access can indeed store the hundreths of a second, but the date type still isn't appropriate for durations. The date type stores both a date and a time--it's a point in time. You are trying to store a duration. I think your method of converting a string to a decimal is fine, though if you have control over how the data are coming in, I would recommend that you split things out into three separate fields for input, so that you don't have to do nearly as much error checking.

Jeremy ==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top