Had a requirement to calculate the weekdays between given date range (No of Days – Weekends). Finally with the help of WWW, I manage to figure out a way to do it in MS SQL DECLARE @START_DATE = ‘2012-09-17’ DECLARE @WEEKDAYS INT SELECT @WEEKDAYS = ( (DATEDIFF(dd, @START_DATE, GETDATE()) + 1) -(DATEDIFF(wk, @START_DATE, GETDATE()) * […]
You are here: Home / Archives for DATEDIFF and weekdays sql