note 44385 added to function.date
| From: | john at nospam dot com | Date: | Wed, 04 Aug 2004 14:16:43 +0000 |
| Subject: | note 44385 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-73925@lists.php.net to get a copy of this message | ||
MySQL DATETIME to php date conversion:
$mysqldatetime;
$t_hour = substr($mysqldatetime,8,2);
$t_min = substr($mysqldatetime,10,2);
$t_sec = substr($mysqldatetime,12,2);
$t_mon = substr($mysqldatetime,4,2);
$t_day = substr($mysqldatetime,6,2);
$t_year = substr($mysqldatetime,0,4);
$php_printable_date = date("F j, Y, g:i
a",mktime($t_hour,$t_min,$t_sec,$t_mon,$t_day,$t_year));
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44385
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44385&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44385&report=yes
Search -- http://master.php.net/manage/user-notes.php