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......
No comments:
Post a Comment
Newer Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment