SQL Server 2012: Find First Sunday of Next Month using EOMONTH

SQL Server 2012 introduced one new TSQL EOMONTH to return the last day of the month that contains the specified date with an optional offset.

In this post, I am sharing syntax and one example to find first Sunday of the next month using EOMONTH.

The Database Administrator many times required to execute database maintenance script at every first Sunday of the next month, so I have prepared this script using EOMONTH.

The Syntax of EOMONTH:

Script to find first Sunday of the Next Month:

First, create sample table with data:


Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from dbrnd.com

Leave a Reply

1 Comment on "SQL Server 2012: Find First Sunday of Next Month using EOMONTH"

Notify of

Sort by:   newest | oldest | most voted
9 months 12 days ago

This is my first time pay a quick visit at here and i
am in fact happy to read all at single place.