php_tricks
Monday, 5 May 2014
Adding n days from current datetime
<?php
$x=3;
$valid=date('Y-m-d H:i:s', time() + $x*(24 * 60 * 60));
?>
$x is the variable where we can give the number of days that has to be incremented from the current datetime......
Newer Posts
Home
Subscribe to:
Comments (Atom)