RE: [PHP] Help w/Date Format from db
| From: | John Coggeshall | Date: | Thu, 27 Jul 2000 14:59:12 +0000 |
| Subject: | RE: [PHP] Help w/Date Format from db | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8462@lists.php.net to get a copy of this message | ||
You could do something as simple as
$date = explode('-', "2000-04-25");
$date = sprintf("%d-%d-%d", $date[1], $date[2], $date[0]);
echo $date;
That would get you "04-25-2000". Check the manual if you want more detailed
instructions, though. (look up date(), mktime()
John
-----Original Message-----
From: Jack Sasportas [mailto:jack@innovativeinternet.com]
Sent: Wednesday, July 26, 2000 10:49 PM
To: php
Subject: [PHP] Help w/Date Format from db
When I pull the date from a file such as
echo mysql_result($result,$i,received_date);
I don't want the standard format of 0000-00-00, Ihave searched a few
places including php.net, but not finding what I want.
I want to take the date from the database, and lets say display
04-01-99.
If someone can please send the proper formatting needed to do this I
would appreciate it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net