How to find records

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…

Hi

Just an example here

records=Model.find :all, :conditions=>["created_on < ? ",2.days.ago]

Sijo

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 do

2009/11/13 Newb N. [email protected]:

pls if i want to get file how i supposed to do

What do you mean by ‘get file’? The above code does what you asked,
finding all records older than two days.

Colin