Added trim date range function