Business Calendar Functions | SQL Date/Time Functions & Expressions | Vantage - Business Calendar Functions - Analytics Database - Teradata Vantage

SQL Date and Time Functions and Expressions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-10-30
dita:mapPath
cpk1628111786971.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
pxz1544241488545
lifecycle
latest
Product Category
Teradata Vantage™

You can specify business calendar functions in an SQL statement wherever you specify UDFs, for example, in an INSERT, UPDATE, DELETE, MERGE, or SELECT statement.

The following facts apply to the business calendar functions:
  • If you do not specify a calendar name, the calendar defaults to the session calendar.
  • All functions related to a year, for example MonthNumber_Of_Year, are calculated relative to January 1 of that year.
  • All functions related to a calendar, for example, DayNumber_Of_Calendar, are calculated relative to the beginning of the calendar, 1900-01-01.
  • You can specify these functions anywhere in a DML statement, in CHECK CONSTRAINTS in the DDL statements, and all other places in an SQL statement where a UDF can be specified.
  • All the definitions of the business calendar functions are stored in the TD_SYSFNLIB database. The format and title of the business calendar functions used in a SELECT statement follow the regular UDF style.
  • These functions are available to all Teradata users and do not require any privileges.
  • All the computations inside the functions are in UTC if the input is of type TIMESTAMP or TIMESTAMP WITH TIME ZONE.