DATEPART(interval, date, [firstdayofweek, firstweekofyear])
DATEPART("yyyy", "11/14/2018")
The date is the date to be used in the calculation and this example returns 2018.
The DATEPART function can be used with any of the valid interval values. These interval values are: Year ("yyyy" or "yy"), Quarter ("q"), Month ("m" or "mm"), Day of Year ("y"), Day ("d" or "dd"), Week ("ww"), Hour ("h"), Minute ("n"), and Second ("s").
DATEPART("w", "11/14/2018")
The DATEPART function can be used to get the day of the week of a date. The "w" argument specifies that the day of the week is to be returned. The date is the date to be used in the calculation. This example returns 4, which is Wednesday.
The DATEPART function is a useful date/time function that can be used to extract a portion of a date/time value.