Hi,
Use to the below query to get the first and last day of any month in SQL Server.
DECLARE @Month int, @Year int, @First datetime, @Last datetime
set @Month = 4
set @Year = 2012
select @First =DATEADD(month,@Month-1,DATEADD(year,@Year-1900,0))
select @Last =DATEADD(day,-1,DATEADD(month,@Month,DATEADD(year,@Year-1900,0)))
select @First as'First Day',@Last as'Last Day'
Regards,
Selvaraj.