note 109767 added to dateinterval.construct
| From: | Anonymous | Date: | Sat, 18 Aug 2012 07:23:28 +0000 |
| Subject: | note 109767 added to dateinterval.construct | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-190125@lists.php.net to get a copy of this message | ||
hello i am getting date and time from database and i want to add dynamic no of days to the date, i
got perfect date but i have difference in time what can i do for this, i am using the code below, i
need perfect time accuracy with the second,
function get_last_date($get_first_date,$day)
{
$dateis = strtotime("+".$day." days", strtotime($get_first_date));
return date("Y-m-d H:m:s", $dateis);
}
$get_last_date= get_last_date($get_first_date,$day);
----
Server IP: 69.147.83.197
Probable Submitter: 117.219.164.210
----
Manual Page -- http://www.php.net/manual/en/dateinterval.construct.php
Edit -- https://master.php.net/note/edit/109767
Del: integrated -- https://master.php.net/note/delete/109767/integrated
Del: useless -- https://master.php.net/note/delete/109767/useless
Del: bad code -- https://master.php.net/note/delete/109767/bad+code
Del: spam -- https://master.php.net/note/delete/109767/spam
Del: non-english -- https://master.php.net/note/delete/109767/non-english
Del: in docs -- https://master.php.net/note/delete/109767/in+docs
Del: other reasons-- https://master.php.net/note/delete/109767
Reject -- https://master.php.net/note/reject/109767
Search -- https://master.php.net/manage/user-notes.php