I'm trying to count the number of rows in a certain table by datetime.
More specifically, by a certain month, but can't find the right way to write the conditions for it.
xxx.count(:all, :conditions=> :xxx => yyy)
I have a datetime yyy
to compare with xxx
, but only want to compare the year and month.