fixes dateformat error for end date