Derives the four-digit year value from a Datetime value. Source value can be a a reference to a column containing Datetime values or a literal. |
NOTE: If the source Datetime value does not include a valid input for this function, a missing value is returned. |
year(MyDate) |
Output: Returns the four-digit year values from the MyDate
column.
year(datetime_col) |
Argument | Required? | Data Type | Description |
---|---|---|---|
datetime_col | Y | datetime | Name of column whose year values are to be computed |
Name of the column whose year value is to be computed.
Required? | Data Type | Example Value |
---|---|---|
Yes | Datetime | myDate |