Bug #43099 | MySQL does not sort datetime formatted in 12 hour format correctly | ||
---|---|---|---|
Submitted: | 23 Feb 2009 7:30 | Modified: | 23 Feb 2009 7:51 |
Reporter: | S P | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
Version: | All | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | 12 hour format, comparison, sorting |
[23 Feb 2009 7:30]
S P
[23 Feb 2009 7:51]
Valeriy Kravchuk
This is not a bug. DATE_FORMAT returns string as the result, and stings are compared as strings, not as dates. See http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-format for the details.