Created
April 6, 2012 17:59
-
-
Save shamil614/2321658 to your computer and use it in GitHub Desktop.
Find between two dates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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