misiek
1/31/2006 5:38:00 PM
I got in database datetime field
I need to pick all data from database where date is this year
sample
database datetime a
2006-01-30 00:00:00 this date is this year 2006
2005-01-30 00:00:00 is not
sample
year = 2006
time_in -> looks now like that 2006-01-30 00:00:00
@hours = Hour.find(:all, :conditions => " time_in = " + year )
so I need do like : time_in.year = year
heh but it does not work of course
any one please ...??