Skip to content

Commit 30fb40b

Browse files
authored
Update day-transact-sql.md
Text revisions to tighten and optimize the reading flow of the material.
1 parent 56cdcf3 commit 30fb40b

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

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

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ monikerRange: ">= aps-pdw-2016 || = azuresqldb-current || = azure-sqldw-latest |
3232
# DAY (Transact-SQL)
3333
[!INCLUDE[tsql-appliesto-ss2008-all-md](../../includes/tsql-appliesto-ss2008-all-md.md)]
3434

35-
Returns an integer representing the day (day of the month) of the specified *date*.
35+
This function returns an integer that represents the day (day of the month) of the specified *date*.
3636

37-
For an overview of all [!INCLUDE[tsql](../../includes/tsql-md.md)] date and time data types and functions, see [Date and Time Data Types and Functions (Transact-SQL)](../../t-sql/functions/date-and-time-data-types-and-functions-transact-sql.md).
37+
See [Date and Time Data Types and Functions (Transact-SQL)](../../t-sql/functions/date-and-time-data-types-and-functions-transact-sql.md) for an overview of all [!INCLUDE[tsql](../../includes/tsql-md.md)] date and time data types and functions.
3838

3939
![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)
4040

@@ -46,24 +46,33 @@ DAY ( date )
4646

4747
## Arguments
4848
*date*
49-
Is an expression that can be resolved to a **time**, **date**, **smalldatetime**, **datetime**, **datetime2**, or **datetimeoffset** value. The *date* argument can be an expression, column expression, user-defined variable or string literal.
49+
An expression that resolves to one of the following data types:
50+
51+
+ **date**
52+
+ **datetime**
53+
+ **datetimeoffset**
54+
+ **datetime2**
55+
+ **smalldatetime**
56+
+ **time**
57+
58+
For *date*, `DAY` will accept a column expression, expression, string literal, or user-defined variable.
5059

5160
## Return Type
5261
**int**
5362

5463
## Return Value
5564
DAY returns the same value as [DATEPART](../../t-sql/functions/datepart-transact-sql.md) (**day**, *date*).
5665

57-
If *date* contains only a time part, the return value is 1, the base day.
66+
If *date* contains only a time part, `DAY` will return 1 - the base day.
5867

5968
## Examples
60-
The following statement returns `30`. This is the number of the day.
69+
This statement returns `30` - the number of the day itself.
6170

6271
```sql
6372
SELECT DAY('2015-04-30 01:01:01.1234567');
6473
```
6574

66-
The following statement returns `1900, 1, 1`. The argument for *date* is the number `0`. [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] interprets `0` as January 1, 1900.
75+
This statement returns `1900, 1, 1`. The *date* argument has a number value of `0`. [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] interprets `0` as January 1, 1900.
6776

6877
```sql
6978
SELECT YEAR(0), MONTH(0), DAY(0);

0 commit comments

Comments
 (0)