MS Access Can Handle Millisecond Time Values--Really
MS Access can retrieve and measure time with millisecond precision, but only with the help of a few well-known API calls and several user-defined functions.
by Susan Sales Harkins,
Gustav Brock
September 9, 2008
hen database developers must deliver time values that are accurate to the millisecond, many assume Access can't handle that requirement. They might deem SQL Server the obvious choice, not realizing that only the most recent version, SQL Server 2008, is capable of millisecond precision. Earlier versions offer a resolution of only 3.3 milliseconds, while SQL Server 2008's new date/time data type supports time values as small as 0.1 milliseconds (or 100 nanoseconds).
However, the assumption that Access can't handle time values to the millisecond is not entirely true. In fact, Access and Jet both can store milliseconds because Double, the underlying data type of date/time, has a resolution one thousand times larger than date/time's smallest increment of one second. However, manipulating time values with millisecond precision in Access requires some crafty programming. You need the help of a couple of API calls, which you wrap in functions that mimic the standard timing functions in Access. This article explains how to apply this technique, which will enable you to create, retrieve, and measure time values down to the millisecond.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!