|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
IntroductionThe .NET Framework provides a simple BackgroundUnmanaged languages often expose datetime values as OLE Automation dates (OADate). An OLE Automation date is implemented as a floating-point number whose value is the number of days from midnight, 30 December 1899. In 32-bit systems, a Ticks representation is higher-fidelity than an OADate representation. Consequently, a given datetime value should be converted to Ticks from within SQL Server, not unmanaged application code. Using the codeCreate the User-Defined Functions supplied with this article on a SQL Server database. Use the DECLARE @TestDate datetime
SET @TestDate = GetDate()
select @TestDate, dbo.DateTimeToTicks(@TestDate)
Points Of InterestFor information on the .NET Framework DateTime structure, see here. Documentation on Ticks and OADates is here and here. History
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||