Total Pageviews

Search This Blog

Thursday, September 19, 2013

EOMONTH function in SQL Server 2012

Dear Friends,

A few weeks ago, I was writing some stored procs in SQL Server and I found this EOMONTH function handy.

This is a new function in SQL Server 2012

EOMONTH function takes a date argument/parameter and returns the last day of that month.

Quite handy.

Please refer to this technet article below for detailed syntax and some examples

And if you would like to know how to achieve this in previous versions of SQL, have a look at the below link.

Btw, in AX, we have an equivalent dateEndMth function in Global class for the above purpose.

Happy Querying :)

No comments: