Returns an integer representing the day (day of the month) of the specified date.
For an overview of all Transact-SQL date and time data types and functions, see Date and Time Data Types and Functions (Transact-SQL).
Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database.
DAY returns the same value as DATEPART (day, date).
If date contains only a time part, the return value is 1, the base day.