[AccessD] Losing 3ms on date insert?

James Button jamesbutton at blueyonder.co.uk
Tue Nov 27 05:20:59 CST 2018


Stuart,

Thanks for the info 

As per the usual GIGO - 
I take the correction to the stored input. 

I was not aware that the date/time was actually maintained to the milliseconds
by the VBA processing.
Somehow I had got the idea that while the storage would allow for parts of
seconds, the time management within VBA had been set to effectively discount any
part of a time less than a second that was entered on the basis it was not
stored accurately.

Mostly I have been using the numeric "Double" to hold times that had to be
passed to Excel 
And - this, actually an Access thread.

Regards, and thanks for the link - 
With the bit about 3.3 milliseconds accuracy in the older DBMS

And .... My main developer experiences with MS DBMS's -  Access etc. were way ..
way .... way ..... back in the 1990'ies.

JimB



-----Original Message-----
From: AccessD <accessd-bounces at databaseadvisors.com> On Behalf Of Stuart
McLachlan
Sent: Tuesday, November 27, 2018 1:35 AM
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
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