Created
March 13, 2015 21:53
-
-
Save zachbonham/4e761f1af237c16dd5bc to your computer and use it in GitHub Desktop.
NEW_TIMESTAMP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE FUNCTION NEW_TIMESTAMP() | |
RETURNS int | |
AS | |
BEGIN | |
DECLARE @epoch INT; | |
SELECT @epoch = DATEDIFF(SECOND, {d '1970-01-01'}, GETUTCDATE()) | |
RETURN @epoch; | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment