T SQL Function Number Of Days In Range For Date Range