• I want to update the post_date of all the posts in a WordPress to random dates within a range. For example, random dates between 2009-01-01 to current date.

    I tried this.

    UPDATE wp_posts SET post_date = ‘2008-01-01 08:00:00’ + interval rand()*210 day + interval rand()*36000 second

    But the dates are all the same.

    I got the code from http://answers.yahoo.com/question/index?qid=20080430140007AARVfec

    Can any MySQL guru please advise?

  • The topic ‘Update random dates to post_date – MySQL’ is closed to new replies.