YEAR

Extracts the year from the given datetime.

Syntax

YEAR ( dateobj )

Arguments

Return Type

Integer

Examples

memsql> select year('2009-02-13');
+--------------------+
| year('2009-02-13') |
+--------------------+
|               2009 |
+--------------------+

Related Topics

Was this article useful?