Updated: 5 August 2010
Use EOMONTH to calculate the date for the last day of the month that is the indicated number of months before or after the start date. Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month.
SELECT [westclintech].[wct].[EOMONTH] (
The date the number of months is added to or subtracted from. @Start_date is an expression that returns a datetime or smalldatetime value, or a character string in date format.
an integer added to the @Start_date representing the number of months before or after the startdate. @Months is an expression of type int or of a type that can be implicitly converted to int.
· To select the last day of the month of the @Start_date, set @Months to zero
· To select the last day of a month after @Start_date, make sure @Months is greater than zero
· To select the last day of a month before @Start_date, make sure @Months is less than zero
Here is the result set