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

SQL Anywhere 11.0.1 (Français) » UltraLite - Database Management and Reference » UltraLite SQL Reference » UltraLite SQL functions » SQL functions (P-Z)

 

YEAR function [Date and time]

Takes a timestamp value as a parameter and returns the year specified by that timestamp.

Syntax
YEAR( datetime-expression )
Parameters
  • datetime-expression   A date, time, or timestamp.

Returns

SMALLINT

Remarks

The value is returned as a SMALL INT.

Standards and compatibility
  • SQL/2003   Vendor extension.

Example

The following example returns the value 2001.

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