Script to find complete months between two given dates

Complete months between two given dates Below script will help in finding the complete months within the 2 given dates. In the below script we takes below dates as exampleStartdate =2015-07-05 Enddate =2016-01-06 /**********************Script Start**************************/ IF (object_id(‘tempdb..#month’) is not null) DROP TABLE #month CREATE TABLE #month (id int identity(1,1),MonthStartDate DATETIME,MonthEndDate DATETIME) DECLARE @startdate AS DATETIME […]

Continue Reading