T-SQL Tutorial

DAY Date Function


Day is an date function and returns an integer representing the day of the month of the specified date.

DAY Syntax:

DAY ( date )

DAY Example:

SELECT DAY('2014-02-22') as Day_1,
DAY('2014-02-22 08:23:49.1234567 +07:10') as Day_2,
DAY(SYSDATETIME()) as Day_3;

Day_1Day_2Day_3
222222