ID: 40242
User updated by: sankee at aol dot com
Reported By: sankee at aol dot com
-Status: Bogus
+Status: Closed
Bug Type: Date/time related
Operating System: linux
PHP Version: 4.4.4
New Comment:
Thank you!
Previous Comments:
------------------------------------------------------------------------
[2007-01-25 23:08:25] [EMAIL PROTECTED]
You're looking into wrong manual.
You need a manual for your database, not PHP.
------------------------------------------------------------------------
[2007-01-25 23:02:17] sankee at aol dot com
Description:
------------
According to the manual, when using date_format, %D should produce a 3
letter representation of the day of the week ('wed' for example). But
for me, it produces the day of the month with a suffix (23rd for
example).
Also, %r should produce the rfc-822 date-time format ('Wed, 23 Jan 2007
12:00:00 EST' for example). This isn't working for me either. Instead
it produces '12:00:00 PM'.
Am I missing something or is this not working right?
Reproduce code:
---------------
MY CODE ATTEMPTING TO USE %D:
SELECT news_title
, news_description
, news_id
, date_format(added, '%D, %d %M %Y %T') AS added
from news
ORDER BY added DESC
LIMIT 0,5
MY CODE ATTEMPTING TO USE %r:
SELECT news_title
, news_description
, news_id
, date_format(added, '%r') AS added
from news
ORDER BY added DESC
LIMIT 0,5
Expected result:
----------------
Wed
Wed, 02 Oct 2002 08:00:00 EST
Actual result:
--------------
23rd
12:00:00 PM
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40242&edit=1