> You have to include the full format to make it work, i.e. including the > YYYYMMDD section of the YYYYMMDDHHMMSS format. The above query will probably > yield no results because you have no data in the given range (year 0000).
Yes i know, but i want the data from all years, months and days sorted by hours. YYYYMMDD should be some kind of a wildcard, so that i only would look at the HHMMSS data. Now i use the HOUR() function, but then MySQL dont uses the index. Regards Emil -- Emil Rasmussen http://noget.net --------------------------------------------------------------------- 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