Skip to content

Instantly share code, notes, and snippets.

@shamil614
Created April 6, 2012 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shamil614/2321658 to your computer and use it in GitHub Desktop.
Save shamil614/2321658 to your computer and use it in GitHub Desktop.
Find between two dates
Object.find(:all, :conditions => ["created_at >= ? and created_at < ?", "#{DateTime.now.strftime("%Y-%m-%d")}", "#{(DateTime.now + 1).strftime("%Y-%m-%d")}"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment