JC: corrected time frame string in db table and fixed CN in view in apply_search_criteria.