Use datetime.date for basic (conversion) and advanced search (#5244)