Bug #67365 | select date range not working with date_format | ||
---|---|---|---|
Submitted: | 24 Oct 2012 18:28 | Modified: | 29 Nov 2012 20:00 |
Reporter: | paulo maciel | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 5.5.27 | OS: | Other (CENTOS) |
Assigned to: | CPU Architecture: | Any | |
Tags: | date range, date_format, from_unixtime, not working, STR_TO_DATE |
[24 Oct 2012 18:28]
paulo maciel
[29 Nov 2012 20:00]
Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php When you compare date_format you compare strings, not numbers. And for strings sort order matters, not only digits they store. See http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html#function_strcmp for details.