How To Get Fractions of a Second from ADO adDBTimeStamp Field (193869)
The information in this article applies to:
- ActiveX Data Objects (ADO) 1.5
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q193869 SUMMARY
The ActiveX Data Objects (ADO) field type 135, adDBTimeStamp, represents a
date-time stamp in the form of "yyyymmddhhmmss" plus a fraction in
billionths. Therefore, an ADO adDBTimeStamp field can contain the fraction
returned from a server Date/Time field. For example, an ADO adDBTimeStamp
field can contain the fractional portion of a SQL Server 6.5 DATETIME
field.
If you try to assign the ADO adDBTimeStamp field to a Visual Basic DATE
datatype variable or to output the field value, Visual Basic drops the
fractional portion of seconds for the adDBTimeStamp field. This article
demonstrates how to retrieve the fractional portion of seconds from an
adDBTimeStamp field.
REFERENCESFor additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
186265 How To Use the SQL Server DATEPART Function to Get Milliseconds
For information on the ADO adDBTimeStamp datatype, please see the ADO Online Documentation for the Type property.
Visual Basic Help; search on: "Date Data Type"
SQL Server Books Online; search on: "datetime", topic: "Date and Time data"
Modification Type: | Minor | Last Reviewed: | 3/14/2005 |
---|
Keywords: | kbDatabase kbhowto KB193869 kbAudDeveloper |
---|
|