Seth Seth - 1 year ago 116
Ruby Question

Rails Console - Find where created at = certain day

With Ruby on Rails console, is it possible to query the database for all records created on a certain day?

something like

date = "january 5 2013"
users = User.find(:all, :conditions => {:created_at => date})

Answer Source

You can do it like this:

date = Date.parse('january 5 2013')
users = User.where(created_at:
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download