## Syntax
```mermaid
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> DATEPART[DATEPART]:::quoted
DATEPART --> End((END))
```
## Purpose
The `DATEPART` SQL function gets the specified datepart from a datetime.
Parameters:
- datepart: a part of a date.
- date: a datetime to get the datepart from.
Returns: a part of a datetime.