Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » UltraLite - 数据库管理和参考 » UltraLite SQL 参考 » UltraLite SQL 函数 » SQL 函数 (P-Z)

 

YEAR 函数 [Date and time]

以时间戳值为参数,返回该时间戳所指定的年份。

语法
YEAR( datetime-expression )
参数
  • datetime-expression   一个日期、时间或时间戳。

返回值

SMALLINT

注释

该值作为 SMALL INT 返回。

标准和兼容性
  • SQL/2003   服务商扩充。

示例

以下示例返回值 2001。

SELECT YEAR( '2001-09-12' );