Time Conversion with Decimal Millisec

J

Jack

I am trying to link or import a CSV file with a time field
with format hh:mm:sec.000

But when I try to import it I get an error.
If I import it as a text field I can't manipulate it
numerically.

What to do?


Jack
 
D

Douglas J. Steele

Date fields in Access don't actually support millisecond precision. Import
it as a text field, then break it into the hour, minute and second
components (using Left, Mid, Right, and possibly InStr) and then the
TimeSerial function to convert the components into a time.

Access doesn't really recognize "time" as a separate component: the date
field is really intended for timestamps.

If your times are representing durations, you might be best off storing them
using a different data type. You could try storing the time as the number of
milliseconds (using a Long should work, unless I goofed on my arithmetic
just now!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top