Hi, how can i make a select from mysql by given year. I have a timestamp field (ts) in table.
Like this: SELECT FROM table WHERE [timestamp(year)] = 2007
SELECT * FROM table WHERE YEAR([timestamp(year)]) = 2007
Thanks! I just didn't spec my problem correctly... This solution is ok, but what about when i need to select it by for example month or day?
Here u can read more about DATE & TIME functions in mysql: http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html
Dont forget to mark thread RESOLVED ...