SQL Server Problem when Converting DateTime from Float
Posted on 2006-06-14
I have one system called Secure Perfect from GE (General Electronics) this system used for Time & Attendence, this system has its database in which this store the employee punch record, when i saw the table it show me both the Microdate and Systemdate fields as float there are some values of Date 14/06/2006
these are the punches record datetime.
when i try to convert these values from my query into user friendly date and time it gives me values with wrong date i.e.
" 2006-06-16" and punch is recorded on " 2006-06-14" and even on the evenmonitor of Secureperfect where i can watch the live punches monitoring it shows me correct date but when i want to generate report base on the data inside database i am facing a problem.
If you try to execute these command on above mention data you will find the date same like i mention show.
commands i try to execute are.
select cast(38882.375556 as datetime)
these both give you this data" 2006-06-16 XX:XX:XX.XX "
but these punches was record on 2006-06-14
looking forward for your reply.