Postgres but I''ll start with that tomorrow...
Thanks
Craig
On Sun, 2006-06-25 at 14:43 +1200, Jonathan Viney wrote:> If you''re using mysql have a look at its date functions:
>
> http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
>
> Model.find(:all, :conditions => [''DATE(time_in) = ?'',
Date.today]) may
> be what you want.
>
> -Jonathan.
>
> On 6/25/06, Craig White <craigwhite@azapple.com> wrote:
> > I have a column called ''time_in'' and it is actually
a timestamp so it
> > has a date and a time.
> >
> > I created a method in my model called time_in_date which is simply
> > time_in.strftime("%m/%d/%Y")
> >
> > I can''t do an sql find on a column that doesn''t
exist so how do I find
> > for a specific date?
> >
> > Craig
> >
> > _______________________________________________
> > Rails mailing list
> > Rails@lists.rubyonrails.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails