Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
TimeToTicks.sql
CREATE FUNCTION [dbo].[TimeToTicks] (@hour int, @minute int, @second int)
RETURNS bigint
WITH SCHEMABINDING
AS
BEGIN
RETURN (((@hour * 3600) + CONVERT(bigint, @minute) * 60) + CONVERT(bigint, @second)) * 10000000
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment