Answer: DATEPART function is used to get part of the specified date.
Syntax:
DATEPART(datepart,date);
Where, datepart specifies the part of the date to return.
date is an expression that returns a datetime or smalldatetime value, or a character string in a date format.
Asked In: Many Interviews |
Alert Moderator