Answers for "php date minus 7 days"

PHP
5

php date plus days

<?php 
// PHP program to add days to $Date 
  
// Declare a date 
$date = "2019-05-10"; 
  
// Add days to date and display it 
echo date('Y-m-d', strtotime($date. ' + 10 days')); 
  
?>
Posted by: Guest on June-04-2020
0

php date format minus 1 day

date('Y-m-d',(strtotime ( '-1 day' , strtotime ( $date) ) ));
Posted by: Guest on September-05-2021

Browse Popular Code Answers by Language