towps
Member since Dec 11, 2008
- Profile: /members/1649-towps.htm
- Comments: 3
Recent Blog Comments By towps
-
Ask Ben: Getting A Random Date From A Date Range In SQL
Posted on Nov 27, 2008 at 8:59 AM
This works as well. select DATEADD(second, rand()*86400, DATEADD(d, rand()*(CAST((@date_to - @date_from) AS INT )), @date_from)) 86400, being the number of seconds in a day. Cheers.... read more »
-
Ask Ben: Getting A Random Date From A Date Range In SQL
Posted on Nov 26, 2008 at 11:39 AM
Hey how about including a random time in that date time as well?... read more »
-
Ask Ben: Getting A Random Date From A Date Range In SQL
Posted on Nov 26, 2008 at 8:55 AM
Great post. Thanks a lot!... read more »