|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-01-25 23:08 UTC] tony2001@php.net
[2007-01-26 14:30 UTC] sankee at aol dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 07:00:01 2025 UTC |
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