In this post explains how to use the DAY function in SQL Server (Transact-SQL) with syntax and examples.
In SQL Server (Transact-SQL), the DAY function returns the day of the month (a number from 1 to 31) given a date value.
The syntax for the DAY function in SQL Server (Transact-SQL) is:
The date from which to extract the day of the month.
The DAY function can be used in the following versions of SQL Server (Transact-SQL):
Let's look at some SQL Server DAY function examples and explore how to use the DAY function in SQL Server (Transact-SQL).
For example: