Answers for "how to get before 7 days date using given date in php"

PHP
1

php 3 days after

$Today=date('y:m:d');
  
// Declare a date 
$date = "2019-05-10"; 
  
//if already have time  then use this  =============
echo date('Y-m-d', strtotime($Today. ' + 10 days')); 

//if already have time  then use this  =============

// add 3 days to date
$NewDate=Date('y:m:d', strtotime('+3 days'));

// subtract 3 days from date
$NewDate=Date('y:m:d', strtotime('-3 days'));

// PHP returns last sunday's date
$NewDate=Date('y:m:d', strtotime('Last Sunday'));

// One week from last sunday
$NewDate=Date('y:m:d', strtotime('+7 days Last Sunday'));
Posted by: Guest on March-22-2022
0

add 7 days to date php

$date = "Mar 03, 2011";
$date = strtotime($date);
$date = strtotime("+7 day", $date);
echo date('M d, Y', $date);
Posted by: Guest on April-20-2020

Browse Popular Code Answers by Language