IBM PureData System for Analytics, Version 7.1

The year() function

The year() function determines the year in the specified date.

You can also determine the year value by using the IBM® Netezza® date_part() function.

Description

The year() function has the following syntax:
int2 = year(date input);

The input value specifies the date.

Returns

Returns an integer representation of the year in the specified date. For example:
select year('1996-2-29');
 YEAR
------
 1996
(1 row)

This example returns 1996.



Feedback | Copyright IBM Corporation 2014 | Last updated: 2014-02-28