I had forgotten this post.
My solution:
# d is my date to filter
start_time = DateTime.strptime("#{d.year}-#{d.month}-01T00:00:00+00:00", '%Y-%m-%dT%H:%M:%S%z').to_time.utc
end_time = DateTime.strptime("#{d.year}-#{d.month}-#{d.day}T23:59:59+00:00", '%Y-%m-%dT%H:%M:%S%z').to_time.utc
Document.where(:date => {:$gt => start_time}).where(:date => {:$lte => end_time}).find_each do |doc|
#Do something with objectexpense.amount
end
Feel free to post a better solution.