UHM-848 modifying to query to use date created as well
UHM-848 fixing syntax error for reports