sql server now - last month code example
Example 1: get current month last date in sql server
SELECT EOMONTH('2019-02-15') end_of_month_feb2019;
Example 2: mssql last day of month
SELECT DATEADD(month, ((YEAR(getdate()) - 1900) * 12) + MONTH(getdate()), -1)