Answers for "adding days in datetime php"

PHP
0

adding days in datetime php

<?php
$date = new DateTime('2016-06-06'); // Y-m-d
$date->add(new DateInterval('P30D'));
echo $date->format('Y-m-d') . "\n";
?>
Posted by: Guest on October-06-2021

Browse Popular Code Answers by Language