How to select database rows by days ,month,years
I have table like this
id count  generatedAt
1  130    2013-01-13 02:21:02
2  120    2013-01-08 04:15:06
3  89     2013-01-08 01:42:57
4  24     2012-11-25 05:31:43
5  3      2012-02-31 09:25:24
I would like to select the rows by day or month or year.
For example by day.
2-3 is same day so I need only 1,2,4,5
for example by month,1,2,3 is same month so I need only 1,4,5
for year I need only 1,4
How can I make it?
I am using doctorine2
 
    