Forum: Ruby on Rails Query that display the list for todays records

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8d69b5f4fcc146d704dbf514157f328a?d=identicon&s=25 Johnroy World (johnroyworld)
on 2009-02-02 09:37
hello all,

How do i make a query on active records that would display the list of
all records that happened on this day or lets says today's transaction
records.

"Datetime" is my data type of the field on the database. Any help /
advice will be appreciated.

Thank you
5772c599ccab3081e0fffb1d54f3b6de?d=identicon&s=25 Andrew Timberlake (andrewtimberlake)
on 2009-02-02 11:39
(Received via mailing list)
On Mon, Feb 2, 2009 at 10:37 AM, Johnroy World <
rails-mailing-list@andreas-s.net> wrote:

> Thank you
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
Model.find(:all, :conditions => {:created_at =>
(Time.now.beginning_of_day..Time.now.end_of_day)})

--
Andrew Timberlake
http://ramblingsonrails.com
http://www.linkedin.com/in/andrewtimberlake

"I have never let my schooling interfere with my education" - Mark Twain
This topic is locked and can not be replied to.