My application stores dates as OLE Automation doubles with the DateTime.ToOADate()
command.
I need to create a SQL view which shows me the Date stored. How can I quickly convert the double to a date?
My application stores dates as OLE Automation doubles with the DateTime.ToOADate()
command.
I need to create a SQL view which shows me the Date stored. How can I quickly convert the double to a date?
Does
work? From here
That sounds pretty much like the same system SQL Server uses when you cast a date as a float except the offset needed to be fiddled by 2 and for "negative" dates. SQL server will substract backwards. So -1.25 is 18:00 whereas for OLE that means 06:00.