Wakan <[EMAIL PROTECTED]> wrote: > But if I change the output format with: DATE_FORMAT(data,'%d-%m-%Y'), > the order by clause attempt to order the new format incorrectly, because > I've an output like this: 12-2-2002, 12-3-2002, 12-4-2002, and 13-2-2002!!! > What can you say about this?
Can you give an example of a query that has the problem? It sounds like you're using DATE_FORMAT() in the ORDER BY as well as in the SELECT. If you do SELECT DATE_FORMAT(data,'%d-%m-%Y') ORDER BY data, and data is a DATE or DATETIME, then you shouldn't have that problem. -- Keith C. Ivey <[EMAIL PROTECTED]> Washington, DC --------------------------------------------------------------------- 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