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:

Using EOMONTH:

Anvesh Patel

Leave a Reply

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

Notify of
avatar
Sort by:   newest | oldest | most voted
Lemo
Guest

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

wpDiscuz