Changed queries to use the new date field