date & time conversion confusion
| From: | Brian Tully | Date: | Mon, 06 Nov 2000 20:15:58 +0000 |
| Subject: | date & time conversion confusion | ||
| Groups: | php.db php.general | ||
| Request: | Send a blank email to php-db+get-4255@lists.php.net to get a copy of this message | ||
hey folks -
i'm having trouble figuring out how to convert an existing date & time into
a more friendly format in PHP. I've used MySQL's date format which stores
the values as YYYY-MM-DD. Now when I select these values from the database
and display them on a web page I'd like to format them along the lines of
MM-DD or Jan 01 or January 1 etc. I've looked into PHP's built-in functions
time() mktime() getdate() etc, but none seem to work with existing values.
Can anyone shed some light as to how I would go about doing this? I know in
Perl there are tons of external libraries to do such things... are they
available for PHP? Another issue is how I go about converting 24 hour time
(00:00:00) into more friendly "XXam". Any help would be greatly
appreciated.
Many thanks,
Brian