Following line returns the last day of the current month as a datetime
DATEADD(day, -1,
cast(MONTH(DATEADD(month,1,getdate())) as varchar)
+'/01/'
+ cast(YEAR(DATEADD(month,1,getdate ())) as varchar)
)
First you calculate the first day of the next month, then you subtract one day.