How can I convert a OLE Automation Date value to a date in SQL Server -


My application returns doubles to dates as the OLE automation at the time of the date. TOOADate () command.

Now, I need to create a SQL view that shows me the date stored.

what

  cast cast (case when oleflat> Then Oleflatt -2.0 ELSE2 * CAST (Ollfolat as ILT) - 2.0 + ABS (Oleflat) as EDD Dedet)  

work? An OLE automation date has been applied as a floating point number, whose integral part is the number of days before or after midnight, 30 December 1899, and whose partial component represents the time of day 24 Shared by For example, midnight, presented by 1.0 on December 31, 1899; 6 AM, January 1, 1900 has been presented by 2.25; Midnight, December 29, 1899 -1.0; And at 6 o'clock, is presented by -1.25 on 29 December 1899.

This very similar system uses SQL Server when you enter a date as a flacant, in which the offset must be left 2 and "negative" dates For SQL Server will fall backwards, then -1.25 is 18:00 while OLE stands for 06:00.


Comments