Added search query considering the date