sql - Update date in mysql database -
i have mysql database client appointments table, want update appointments once year 364 days. gives me same tuesday @ 5:30pm 1 year later. not need update same date, same day 364 days ... except leap year.
please help
why not use mysql date_add
function full documentation here
select date_add(curdate(), interval 1 year)
you can same in update
statement set date columns
set mydate = date_add(mydate, interval 1 year)
Comments
Post a Comment