MySQL Add Days to Datetime Coloumn
247
If you would like to add 1 month to any existing table's ExpireDates column, this query example is for you:
UPDATE TableName
SET ExpireDate = DATE_ADD(ExpireDate, INTERVAL 1 month)
WHERE Status = 1;
This query will update all ExpireDate columns (date or datetime) with Status value is 1 on rows in TablaName "+1 month" by days.
For example:
Old ExpireDate: 01.01.2022
New ExpireDate: 01.02.2022
If you are looking for consultation, fill the Contact Form below.
Failure is an option here. If things are not failing, you are not innovating enough.
Haluk YAMANER
Founder @ Future Software UAE
Founder @ Future Linux
Click here for more about me »