Get the Nth Past Date After Removing a List of Dates from MSSQL
This stemmed from a strange request that came across my desk. I had the need to pull a date 7 business days ago by using T-SQL in Microsoft SQL Server. Sounds simple right? Here’s the catch: the date had to be the 7th business day in the past after removing the days the individual was off. As an example, let’s assume that we’re running this today, March 5th, 2013. The US representation for this is ‘3/5/2013’. Now, let’s assume that the person we’re pulling this for usually has weekends off. However, when he has to work weekends, he has the … Continue reading Get the Nth Past Date After Removing a List of Dates from MSSQL