The formula we need to use is Rand() * (end - start) + start. To obtain the proper values, you use the sample below.
SELECT UNIX_TIMESTAMP('2014-01-01') AS start, UNIX_TIMESTAMP('2014-12-31') AS end;
Once you have the values you want, use the script below to update the desired field with a random date.
UPDATE video SET
published = (RAND() * (1419980400 - 1388530800) + 1388530800)
WHERE published = 0;
The information you have published here is really awesome, as it contains some great knowledge which is very essential for me. Thanks for posting it. Timestamp Converter
ReplyDeleteYou have given great content here.Free Online Voice Chat With Strangers I am glad to discover this post as I found lots of valuable data in your article. Thanks for sharing an article like this.
ReplyDelete