i will use DATE_ADD,now if i want to get a rand time from 2012-10-1 to now,how should i do?
when i use the above code ,it get time isn't what i want. thank you.how to correct it?Code:created=DATE_ADD( DATE_ADD( DATE_ADD( DATE_ADD( DATE_ADD( DATE_ADD( NOW(), INTERVAL 1 YEAR), INTERVAL 11*RAND() MONTH), INTERVAL 30*RAND() DAY), INTERVAL 23*RAND() HOUR), INTERVAL 59*RAND() MINUTE), INTERVAL 60*RAND() SECOND)
eg: 30*RAND(3) what's the value will be?



Reply With Quote




Bookmarks