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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -