Business Calendar Functions | VantageCloud Lake - Business Calendar Functions - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

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.