Home > MySQL > Select random date

Select random date

October 30th, 2009 Leave a comment Go to comments

I use this for insert records into a queue. To avoid overload one day, just split the records up over a number of days ….

now() + INTERVAL rand()*2 day + INTERVAL 2 hour

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
Categories: MySQL Tags:
  1. No comments yet.