»Chuck PUP Payne« sagte am 2002-04-10 um 10:27:19 -0400 : > going 9, 8, 5, 10 on the dates. Here is the SQL statement I am using...
That's because your DATE which you've made with DATE_FORMAT is treated as string. To fix it, I'd write: > SELECT DATE_FORMAT(DATE, '%M %D, %Y') AS DATE, Title, Links, Summary FROM > news WHERE TO_DAYS(NOW()) - TO_DAYS(DATE) <=5 ORDER BY DATE DESC SELECT DATE_FORMAT(DATE, '%M %D, %Y') AS DATE_DSP, DATE, Title, Links, Summary FROM news WHERE TO_DAYS(NOW()) - TO_DAYS(DATE) <=5 ORDER BY DATE DESC This way, you can display the "nicely" formated date in DATE_DSP and still got a "good" copy of date around. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.iso-top.de | Jabber: [EMAIL PROTECTED] iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 21 hours 52 minutes --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php