Share via


Retrieve milliseconds from MS-Access Date field

Question

Monday, November 6, 2006 8:49 AM

Dear Readers,

I have a Access database, which stores the time of each record in a date/time field.

When I add a record to the database using the INSERT query, the time is

added correctly, including the milliseconds parameter. When loading the parameter value with the time I can confirm this milliseonds component is

present and correct.

In my report I provide a list of records, which displays the time with it milliseconds

component.     

The time is correct, but the problem is the milliconds is always 0.   It looks like the database cannot store the time in hours, seconds and minutes, but not milliseconds.

Is it possible to store the milliseconds component in a date/time field of a Access

database ?.     

Thanks

Martin

 

 

 

 

 

 

All replies (3)

Monday, November 6, 2006 3:25 PM âś…Answered

The access date/time data type by default only stores the time to the second...a work around is to store the time parts as integers or use a long integer field to store a timespan in milliseconds


Tuesday, November 7, 2006 8:42 AM

Thanks for that info.

I will store the milliseconds part in a seperate field.

 

Thanks Again

 

 


Monday, November 17, 2008 6:28 AM | 1 vote

> Is it possible to store the milliseconds component in a date/time field of a Access database?

It is. But custom code is needed, which can be found here:

http://www.devx.com/dbzone/Article/39046/1954

/gustav