first and last date of month in sql server from year and month code example
Example: get current month last date in sql server
SELECT EOMONTH('2019-02-15') end_of_month_feb2019;
SELECT EOMONTH('2019-02-15') end_of_month_feb2019;