Returns the year from a date or datetime value.
Category: | Date and Time |
Returned data type: | SMALLINT |
specifies any valid expression that represents a date value.
Data type | DATE |
See | <sql-expression> |
FedSQL Expressions |
specifies any valid expression that represents a datetime value.
Data type | TIMESTAMP |
See | <sql-expression> |
FedSQL Expressions |
Statements
|
Results
|
---|---|
select year(endtime) from custonline; |
2012 2012 2012 2012 2012 2013 2013 2013 2013 2013 |
select year(current_time); |
2013 |