note 91001 added to function.strftime
| From: | jjarsater at gmail dot com | Date: | Wed, 20 May 2009 14:01:43 +0000 |
| Subject: | note 91001 added to function.strftime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-155789@lists.php.net to get a copy of this message | ||
<?php
// Date string
$timestamp = strftime("%Y-%m-%d %H:%M:%S %Y");
// From this string ($timestamp) can we print
echo strftime("%a %d %b %H:%M:%S %Y", strtotime($timestamp))."<br/>";
echo strftime("%a %d %b %H:%M", strtotime($timestamp))."<br/>";
echo strftime("%Y-%m-%d %H:%M:%S", strtotime($timestamp))."<br/>";
echo strftime("%Y-%m-%d %H:%M", strtotime($timestamp))."<br/>";
echo strftime("%Y-%m-%d", strtotime($timestamp))."<br/>";
echo strftime("%a %d %b %Y", strtotime($timestamp))."<br/>";
/*And it will output
Wed 20 May 15:53:40 2009
Wed 20 May 15:53
2009-05-20 15:53:40
2009-05-20 15:53
2009-05-20
Wed 20 May 2009
*/
?>
----
Server IP: 212.63.193.10
Probable Submitter: 213.67.239.250
----
Manual Page -- http://www.php.net/manual/en/function.strftime.php
Edit -- https://master.php.net/note/edit/91001
Del: integrated -- https://master.php.net/note/delete/91001/integrated
Del: useless -- https://master.php.net/note/delete/91001/useless
Del: bad code -- https://master.php.net/note/delete/91001/bad+code
Del: spam -- https://master.php.net/note/delete/91001/spam
Del: non-english -- https://master.php.net/note/delete/91001/non-english
Del: in docs -- https://master.php.net/note/delete/91001/in+docs
Del: other reasons-- https://master.php.net/note/delete/91001
Reject -- https://master.php.net/note/reject/91001
Search -- https://master.php.net/manage/user-notes.php