I have a "Time" column as a money datatype. It represents seconds since Epoch (1970-01-01).
I am converting this to a datetime by doing this -
Dateadd(ss, Time, '1979-01-01')
So, when Time is 1345521925.35 seconds, the result should be 2012-08-21 04:05:25.350. It ends up being 2012-08-21 04:05:25.000 with the decimal on the seconds rounded. I need the fraction to stay. Any ideas? I tried doing a dateadd with ms and multiplying Time by 1000 but I get an error -
Arithmetic overflow error converting expression to data type int.
I am on SQL Server 2012. Any ideas would be appreciated.