I need to create a function in SQL Server 2008 that will mimic mysql\'s UNIX_TIMESTAMP().
Thanks in advance !
For timestamp with milliseconds result I found this solution from here https://gist.github.com/rsim/d11652a8336137832df9:
SELECT (cast(DATEDIFF(s, '1970-01-01', GETUTCDATE()) as bigint)*1000+datepart(ms,getutcdate()))
Answer from @Rafe didn't work for me correctly (MSSQL 20212) - I got 9 seconds of difference.