advanced code snippet search
jamesming on 02/07/09
1 person have marked this snippet as a favorite
UPDATE randomdate SET randomdate=DATE_SUB(CURDATE(),INTERVAL RAND()*365 DAY);
Report this snippet
also you can use date_add(CURDATE(),INTERVAL RAND()*365 DAY) for updating dates in the future
You need to login to post a comment.