note 8344 added to Date and Time functions

From: Date: Thu, 07 Sep 2000 08:18:51 +0000
Subject: note 8344 added to Date and Time functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-4297@lists.php.net to get a copy of this message
if you were trying to convert a mysql format date or time string you could always do it in the select statement by using DATE_FORMAT and TIME_FORMAT. mysql date is 2000-09-07 mysql time is 03:13:27 so... SELECT DATE_FORMAT(date, '%m.%d.%Y') AS date, TIME_FORMAT(time, '%l.%i %p') AS time would produce date as September 7, 2000 and time as 3:13 AM. see <a href=http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#IDX441>this link</a> for more date and time formatting specifiers. http://www.php.net/manual/ref.datetime.php

« previous php.notes (#4297) next »