Created
August 20, 2012 08:14
-
-
Save yinchuan/3402124 to your computer and use it in GitHub Desktop.
SQL Server中随机生成指定范围的日期和时间
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 @insert_date datetime; | |
SET @insert_date = GETDATE(); | |
SET @insert_date = @insert_date + rand() * 1.0/24 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment