• Good to see another 2012 question. I hadn't read about Eomonth before, so had to read a BoL page and learn something new. 😎

    It's mildly irritating though, having to work out what days of the week are 29 Feb 2016 and 31 Dec 2016 - the sort of thing that would tempt me to run the code if the version of of SQL Server I have (2008 R2) included Eomonth. 😉

    edit: Like Koen, I assumed that the new function wouldn't be screwed up - after all, the date handling in earler versions recognised leap years OK, why would this new function in 2012 be different? (I wasn't aware of teh EXCEL function - so maybe that was an easier choice for me than for Koen :-D).

    Tom