Date before and after the current date
Date before and after the current date
$date = date("Y-m-d");// current date
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 day");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 week");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +2 week");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 month");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +30 days");
or
$newDate = strtotime('+15 days',$dateInt);
Adding Days To Dates In MySQL
DATE_ADD(date_starts,INTERVAL 14 DAY)
eg.
UPDATE events SET date_starts = DATE_ADD(date_starts,INTERVAL 14 DAY)
WHERE event_id = 3;

Post a Comment