Description
Returns the specified part of a given date.
Syntax
DATEPART ( interval, date )
Parameter | Description |
---|---|
interval | String expression that is the interval of time to add. Interval can be one of the following values:
|
date | Date to be evaluated. |
Remarks
Use the DATEPART function to evaluate a date and return a specific interval of time. For example, use DATEPART to calculate the day of the week or the current hour.