Mukund wrote:
> Ruby handles date ranges as integers internally so it is a bad idea to
> try that.   You can do something simpler using the array syntax of
> conditions
> 
> :conditions => ["received_date >= ? and received_date
> <= ?",posted_date, posted_date]
> 
> This will form the necessary SQL for the database query.

Or even better, "received_date between ? and ?".

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to