--SQL Server 2008
SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)) -- Last day of current month
Output:
2015-04-30 23:59:59.000 This is compatible with SQL Server 2008...
SQL Server 2012 introduced EOMONTH() function, we can find the last day of current month very easily in SQL Server.
--SQL Server 2012
SELECT EOMONTH(GETDATE()) LastDayInCurrentMonth
GO
LastDayInCurrentMonth
2015-04-30