note 8344 modified in ref.datetime by irc-html

From: Date: Sun, 20 Jan 2002 02:05:29 +0000
Subject: note 8344 modified in ref.datetime by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25549@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 http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#IDX441 for more date and time formatting specifiers. --was-- 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/en/ref.datetime.php

« previous php.notes (#25549) next »