Adding days to a timestamp

后端 未结 7 1301
春和景丽
春和景丽 2021-02-05 07:59

Giving a starting date, I\'m adding four times seven days to get 5 different dates separated exactly a week each one.

//$date = \'28-10-2010\';
$timestamp = mkti         


        
7条回答
  •  梦谈多话
    2021-02-05 08:36

    In case someone needs this, just like me referencing the site: Today, current time, Y-m-d H:i:s, plus +7 Days. OR you could add +3 Months, etc.

    $timestamp=strtotime("+7 Days");
    $nowtime =  date('Y-m-d H:i:s', $timestamp);
    

提交回复
热议问题