I want to do:
ItemCheck.where('created_at between ?',today, today + 1.day) # <- from 12:00 midnight -> 12:00 midnight
Is there a way to do Time.new and tell it to throw away the hour / min / second values?
I want to do:
ItemCheck.where('created_at between ?',today, today + 1.day) # <- from 12:00 midnight -> 12:00 midnight
Is there a way to do Time.new and tell it to throw away the hour / min / second values?
I like to do something like this
ItemCheck.where(:created_at => @selected_date.beginning_of_day..@selected_date.end_of_day)
also look at Rails ActiveRecord date between