Posted By

jamesming on 02/07/09


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

virendrakryadav


Update random dates in MYSQL table


 / Published in: MySQL
 

  1. UPDATE randomdate SET randomdate=
  2. DATE_SUB(CURDATE(),INTERVAL RAND()*365 DAY);

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jamesming on February 7, 2009

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.