1. February 2011 18:51
It's something that all of a sudden when you think you need it. You cant think of how to do it.
So here is a quick function that turns a unix timestamp into a datetime
CREATE FUNCTION [dbo].[UNIXToDateTime] (@timestamp int)
DECLARE @ret datetime
SELECT @ret = DATEADD(second, @timestamp, '1970/01/01 00:00:00')
An example on how to use it
You may also want to see the convert to unix timstamp function