EOMONTH Function in SQL Server 2012

EOMONTH Function is used to return last day of the month of the specified date.


select EOMONTH(TRY_CONVERT(date,'3-10-2017',105))


Optional parameter in EOMONTH Function

The EOMONTH has the optional parameter for the month which is of int data type. If we passed the same it will increment the month as defined in the parameter.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: