A Teradata Warehouse Miner specific function is provided for transforming a date expression, or the date portion of a timestamp expression, into one of many fields based on the Teradata system calendar. The type of the expression returned is always integer. Although the built-in Teradata system calendar is not used to perform the function, the function mimics the derivation of each of the fields in the Teradata system calendar. It uses some of the same calculations used in the underlying system calendar views, but it also relies on Teradata date arithmetic and the standard SQL EXTRACT function. Further, the Teradata Warehouse Miner calendar function may be applied equally to a date or timestamp expression.
Numeric functions can operate in general on any expression that can automatically be converted to a numeric value. Character type operands are automatically converted to a number of type float if possible performing the numeric function. Additionally, the standard and Teradata specific numeric operators are supported. Double-click on Calendar to view the supported functions and operators.
The following figure shows the Calendar functions and operators available when connected to a Teradata database.
The following figure shows the Calendar functions and operators available when connected to an Aster database.