Search by hour and by day working properly