Added searchDate() function