Created
December 24, 2013 13:23
-
-
Save radleta/8113311 to your computer and use it in GitHub Desktop.
Round DateTime to Nearest Minute. Useful when grouping by DateTime to round to the nearest minute.
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
SELECT DATEADD(MINUTE, 1+DATEDIFF(MINUTE, 0, GETDATE()), 0) NearestMinute |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment