dear all how to find records which are 2 days older than from current date. i have a date field in my table. any exmaple pls... -- Posted via http://www.ruby-forum.com/.
Hi Just an example here records=Model.find :all, :conditions=>["created_on < ? ",2.days.ago] Sijo -- Posted via http://www.ruby-forum.com/.
Sijo k g wrote:> Hi > > Just an example here > > records=Model.find :all, :conditions=>["created_on < ? ",2.days.ago] > > > Sijopls if i want to get file how i supposed to do -- Posted via http://www.ruby-forum.com/.
2009/11/13 Newb Newb <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Sijo k g wrote: >> Hi >> >> Just an example here >> >> records=Model.find :all, :conditions=>["created_on < ? ",2.days.ago] >> >> >> Sijo > > pls if i want to get file how i supposed to doWhat do you mean by ''get file''? The above code does what you asked, finding all records older than two days. Colin