MSSQL – get the first and the last date of the month
SELECT DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0) AS StartOfMonthDateSELECT EOMONTH(getdate()) AS EndOfMonthDate
SELECT DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0) AS StartOfMonthDateSELECT EOMONTH(getdate()) AS EndOfMonthDate