note 68324 deleted from function.strftime by danbrown

From: Date: Wed, 04 Feb 2009 01:19:35 +0000
Subject: note 68324 deleted from function.strftime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-150184@lists.php.net to get a copy of this message
Note Submitter: Moritz Stoltenburg ---- 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')); ?>

« previous php.notes (#150184) next »