td_year_end
Purpose
Returns the year that ends immediately after the DATE or TIMESTAMP specified in expression_1.
Syntax
Syntax Elements
calendar_name
A calendar name. The possible values are Teradata, ISO, and COMPATIBLE.
This argument must be a character literal and cannot be a table column or expression. If you do not name a calendar, Teradata uses the calendar for the session.
expression_1
An expression that results in a DATE, TIMESTAMP, or TIMESTAMP WITH TIME ZONE value.
If expression_1 is DATE, expression_2 cannot be specified.
expression_2
A TIME, TIME WITH TIME ZONE, or NULL value. If NULL is specified, TIME is assumed to be 00:00:00+00:00.
NULL
The business calendar for the session.
TD_SYSFNLIB
Name of the database where the function is located.
ANSI Compliance
This is a Teradata extension to the ANSI SQL:2011 standard.
Argument Types
The function is overloaded and can be invoked with one, two, or three arguments.
The first argument can be one of the following data types:
The second argument can be one of the following system-defined calendars (TERADATA, ISO, or COMPATIBLE) or NULL
The third argument can be one of the following data types:
Result
The return value is one of the following data types:
Example
The following SQL statement:
SELECT TD_YEAR_END(TIMESTAMP'2012-01-15 10:00:00','ISO');
returns 2012-12-30 23:59:59
.