Skip to content

Commit b6a3fca

Browse files
authored
Update eomonth-transact-sql.md
Text revisions to tighten and optimize the reading flow of the material.
1 parent 99e355b commit b6a3fca

1 file changed

Lines changed: 18 additions & 10 deletions

File tree

docs/t-sql/functions/eomonth-transact-sql.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ monikerRange: ">= aps-pdw-2016 || = azuresqldb-current || = azure-sqldw-latest |
2727
# EOMONTH (Transact-SQL)
2828
[!INCLUDE[tsql-appliesto-ss2012-all-md](../../includes/tsql-appliesto-ss2012-all-md.md)]
2929

30-
Returns the last day of the month that contains the specified date, with an optional offset.
30+
This function returns the last day of the month containing a specified date, with an optional offset.
3131

3232
![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
3333

@@ -38,19 +38,19 @@ EOMONTH ( start_date [, month_to_add ] )
3838
```
3939

4040
## Arguments
41-
*start_date*
42-
Date expression specifying the date for which to return the last day of the month.
41+
*start_date*
42+
A date expression that specifies the date for which to return the last day of the month.
4343

44-
*month_to_add*
45-
Optional integer expression specifying the number of months to add to *start_date*.
44+
*month_to_add*
45+
An optional integer expression that specifies the number of months to add to *start_date*.
4646

47-
If this argument is specified, then **EOMONTH** adds the specified number of months to *start_date*, and then returns the last day of the month for the resulting date. If this addition overflows the valid range of dates, then an error is raised.
47+
If the *month_to_add* argument has a value, then `EOMONTH` adds the specified number of months to *start_date*, and then returns the last day of the month for the resulting date. If this addition overflows the valid range of dates, then `EOMONTH` will raise an error.
4848

4949
## Return Type
5050
**date**
5151

5252
## Remarks
53-
This function can be remoted to [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)] servers and higher. It cannot be remoted to servers with a version lower than [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)].
53+
The `EOMONTH` function can remote to [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)] servers and higher. It cannot be remote to servers with a version lower than [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)].
5454

5555
## Examples
5656

@@ -61,8 +61,7 @@ DECLARE @date DATETIME = '12/1/2011';
6161
SELECT EOMONTH ( @date ) AS Result;
6262
GO
6363
```
64-
65-
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
64+
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
6665

6766
```
6867
Result
@@ -71,7 +70,7 @@ Result
7170
7271
(1 row(s) affected)
7372
```
74-
73+
7574
### B. EOMONTH with string parameter and implicit conversion
7675

7776
```
@@ -92,6 +91,15 @@ Result
9291

9392
### C. EOMONTH with and without the month_to_add parameter
9493

94+
Note: the values shown in these result sets reflect an
95+
execution date between and including
96+
97+
12/01/2011
98+
99+
and
100+
101+
12/31/2011
102+
95103
```sql
96104
DECLARE @date DATETIME = GETDATE();
97105
SELECT EOMONTH ( @date ) AS 'This Month';

0 commit comments

Comments
 (0)