DAY
Returns an integer representing the day (day of the month) of the specified date.
Syntax
DAY ( date )
Arguments
date
Is an expression that can be resolved to a time, date, smalldatetime, datetime, datetime2, or datetimeoffset value. date can be an expression, column expression, user-defined variable, or string literal.
Return types
int
Example
SELECT DAY('2015-04-30 01:01:01.1234567');