Last active
August 29, 2015 14:09
-
-
Save jsauve/19c084612ac0466921a0 to your computer and use it in GitHub Desktop.
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
DECLARE @time DATETIME = DATEFROMPARTS(2014, 11, 15); | |
-- Using 998 for milliseconds portion because using 999 winds up being the same as 000 of the next second, for some weird reason. | |
-- This winds up being 2014-11-15 23:59:59.997, even though we've specified 998. | |
SELECT DATETIMEFROMPARTS(DATEPART(year, @endTime), DATEPART(month, @endTime), DATEPART(day, @endTime), 23, 59, 59, 998); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment