DECLARE @StartDate DATETIME, @EndDate DATETIME
SET @StartDate = DATEADD(mm, DATEDIFF(mm, 0, getdate()) - 1, 0)
SET @EndDate = DATEADD(dd, -1, DATEADD(mm, 1, @StartDate))
SELECT @StartDate,@EndDate
SELECT Name FROM Employee WHERE date_created BETWEEN @StartDate AND @EndDate
SET @StartDate = DATEADD(mm, DATEDIFF(mm, 0, getdate()) - 1, 0)
SET @EndDate = DATEADD(dd, -1, DATEADD(mm, 1, @StartDate))
SELECT @StartDate,@EndDate
SELECT Name FROM Employee WHERE date_created BETWEEN @StartDate AND @EndDate