Acces97 - DateTime - how to set millisecond ?

  • Thread starter Thread starter Franck Fouache
  • Start date Start date
F

Franck Fouache

Hi,
How to fill a datetime field by sql statement, with hours and millisecond
....
i'd like to do something like update vTable set vDate="03/10/2007
10.05.01.444" ... it works without milliseconds but i need to fill
millisecond.
Best regards.
 
The Date data type doesn't have millisecond resolution. Dates are stored as
8 byte floating point numbers, where the integer portion represents the date
as the number of days relative to 30 Dec, 1899, and the decimal portion
represents the time as a fraction of a day.

Floating point numbers are prone to round-off errors, and the number of
significant figures that can be stored depends on the size of the integer
portion. If memory serves correctly, with current dates, the best resolution
you can expect is about 3 milliseconds.
 
The Date data type doesn't have millisecond resolution. Dates are stored as
8 byte floating point numbers, where the integer portion represents the date
as the number of days relative to 30 Dec, 1899, and the decimal portion
represents the time as a fraction of a day.

Floating point numbers are prone to round-off errors, and the number of
significant figures that can be stored depends on the size of the integer
portion. If memory serves correctly, with current dates, the best resolution
you can expect is about 3 milliseconds.

The bottom line is the smallest time granule supported for DATETIME
values in Access/Jet SQL is one second. Sure, you leverage double
float to gain sub-second values but then you can also use scaled
integers to support whatever granularity you like. The point is, go
beyond the one second granularity and you must write your own temporal
functionality (DATEDIFF, DATEPART, DATEADD, etc -- no mean feat!)
because Access/Jet's no longer work.

It is usually the case that DATETIME isn't appropriate anyhow because
the data are durations rather than instants.

Jamie.

--
 
Back
Top