In Ruby on Rails I'm doing something like:
Appointment.find( :first, :conditions => "staff_id = #{staff_id} AND datetimefield = #{datetime}")
... where datetimefield is of course, a datetime field. But, I only want rows where the date is equal to a given day, say 2/12/2011. I don't care about the time. What's an easy way to do this?
Thanks!