[AccessD] Losing 3ms on date insert?

Jim Lawrence accessd at shaw.ca
Tue Nov 27 23:51:50 CST 2018


Interesting. 

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 and Gustav Brock

Jim

----- Original Message -----
From: "stuart" <stuart at lexacorp.com.pg>
To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com>
Sent: Monday, November 26, 2018 5:35:04 PM
Subject: Re: [AccessD] Losing 3ms on date insert?

There ARE milliseconds available in a stored Date/Time. It's just that  MS make it very 
difficult to display or work with them.  "hh:mm:ss" is just a display format and doesn't tell us 
anything about  the actual data storage. 

As you say, the storage is a Double which gives you 15-17 decimal digits of precision. 
Assuming that you use a maximum of 6 of those for the date part (which will handle up to 
around the year 2740!), that still leaves at least 9 significant digits.  Since a second only 
required 5 significant digits (1/86400)  that leaves a further 4 significant digits for partial 
seconds (i.e 1/1000 second precision).
 
http://www.devx.com/dbzone/Article/39046

"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. "



On 27 Nov 2018 at 0:35, James Button via AccessD wrote:

> 
> IN VBA a date is an 8 bit floating point value as in  integer day and
> fractional hh:mm:ss  
> 
> Note   NO MILLISECONDS
> 


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list