note 56387 added to function.date
| From: | g_freelanceatyahoodotwhatever at osu1 dot php dot net | Date: | Thu, 01 Sep 2005 06:17:23 +0000 |
| Subject: | note 56387 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94565@lists.php.net to get a copy of this message | ||
Just to participate in this open source forum. Sorry if someone have written it before (i'm a
newbie).
Here is an example to display a user-formatted date of your MySQL-formatted one.
consider $s_result['DOB'] is your date in MySQL format
and it's value is 1980-13-10
echo date('F jS, Y',mktime(0,0,0,
substr($s_result['IDDOB'],5,2),
substr($s_result['IDDOB'],8,2),
substr($s_result['IDDOB'],0,4)));
will output October, 13th.
But it still causes error when deals with year values less than 1970 (say 1969), though..
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56387
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56387&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56387&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56387&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56387&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56387&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56387&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56387&report=yes
Search -- http://master.php.net/manage/user-notes.php