MSSQLDate/Time FunctionsDAY
DATEPART

DAYDate/Time Functions

MONTH

Returns the day.

Syntax

DAY(date)

Example

Enter values below to update the example in real time.

order_id
order_date
day_part
orders
SELECT order_id, DAY(order_date) AS day_part FROM orders;