Where_certain_day Jan 12th, 2019 1:39 am date = A.last.created_at A.where(created_at: date.midnight..date.end_of_day)