Matching day in datetime field from sqlite
        Posted  
        
            by 99miles
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by 99miles
        
        
        
        Published on 2010-03-22T04:26:27Z
        Indexed on 
            2010/03/22
            4:31 UTC
        
        
        Read the original article
        Hit count: 373
        
ruby-on-rails
|sqlite
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!
© Stack Overflow or respective owner