note 102351 added to function.date
| From: | betoaih at hotmail dot com | Date: | Thu, 10 Feb 2011 04:15:47 +0000 |
| Subject: | note 102351 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-176834@lists.php.net to get a copy of this message | ||
@ info at anu3d dot info
Your code is giving the wrong output because you have misused the second "m" in your date
string format. "m" is used to output the month, not minutes. To output the minutes with 2
digits, you should use "i" instead.
<?
echo date("Y-m-d H:i:s",$i);
?>
Regards
----
Server IP: 189.126.97.120
Probable Submitter: 189.69.133.125
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/102351
Del: integrated -- https://master.php.net/note/delete/102351/integrated
Del: useless -- https://master.php.net/note/delete/102351/useless
Del: bad code -- https://master.php.net/note/delete/102351/bad+code
Del: spam -- https://master.php.net/note/delete/102351/spam
Del: non-english -- https://master.php.net/note/delete/102351/non-english
Del: in docs -- https://master.php.net/note/delete/102351/in+docs
Del: other reasons-- https://master.php.net/note/delete/102351
Reject -- https://master.php.net/note/reject/102351
Search -- https://master.php.net/manage/user-notes.php