I need to create a function in SQL Server 2008 that will mimic mysql\'s UNIX_TIMESTAMP().
UNIX_TIMESTAMP()
Thanks in advance !
Here's a single-line solution without declaring any function or variable:
SELECT CAST(CAST(GETUTCDATE()-'1970-01-01' AS decimal(38,10))*86400000.5 as bigint)