Skip to main content


Member since Jul 7, 2009

Recent Blog Comments By CRH

  • Ask Ben: Getting A Random Date From A Date Range In SQL

    Posted on Jul 7, 2009 at 1:48 PM

    Here's a slightly modified version... selecting a random time during an 8hr period during a particular day. (28800 is the number of seconds in 8 hours.) I send the NEWID() through RAND() to guarantee a unique timestamp for each row. DECLARE @date_from DATETIME; DECLARE @date_to DATETIME; SET @... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel