note 68324 added to function.strftime

From: Date: Sat, 22 Jul 2006 17:54:40 +0000
Subject: note 68324 added to function.strftime
Groups: php.notes 
Request: Send a blank email to php-notes+get-115049@lists.php.net to get a copy of this message
In response to the note supplied by "segfault nycap rr com". Here is a quicker and easier way: Use the MySQL Time Function TIME_FORMAT() in your query: mysql> SELECT TIME_FORMAT('14:35:00', '%l:%i %p'); Or try '%l' in PHP, it works on most systems and is part of the Open Group specification of strftime(). <?php echo strftime('%l:%M %p', strtotime('14:35:00')); ?> ---- Server IP: 66.163.161.117 Probable Submitter: 85.214.9.193 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.strftime.php Edit -- http://master.php.net/note/edit/68324 Del: integrated -- http://master.php.net/note/delete/68324/integrated Del: useless -- http://master.php.net/note/delete/68324/useless Del: bad code -- http://master.php.net/note/delete/68324/bad+code Del: spam -- http://master.php.net/note/delete/68324/spam Del: non-english -- http://master.php.net/note/delete/68324/non-english Del: in docs -- http://master.php.net/note/delete/68324/in+docs Del: other reasons-- http://master.php.net/note/delete/68324 Reject -- http://master.php.net/note/reject/68324 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#115049) next »