DATEADD_UDF

Some parts of the output code are omitted for clarity reasons.

Definition

Helper function that adds two different dates

PUBLIC.DATE_ADD_UDF(FIRST_DATE DATE, SECOND_DATE DATE)

Parameters

FIRST_DATE DATE

The first date value that is to be added.

SECOND_DATE DATE

The second date value is to be added along with first_date.

Returns

A date resulting from the addition of the two parameters.

Example

Input:

IN -> Teradata_01.sql
SELECT 
    CAST(CAST (COLUMNB AS DATE FORMAT 'MM/DD/YYYY') AS TIMESTAMP(0))
    + 
    CAST (COLUMNA AS TIME(0) FORMAT 'HHMISS' )
FROM TIMEDIFF;

Output:

OUT -> Teradata_01.sql
SELECT
    PUBLIC.DATEADD_UDF(CAST(CAST(COLUMNB AS DATE) !!!RESOLVE EWI!!! /*** SSC-EWI-0033 - FORMAT 'MM/DD/YYYY' REMOVED, SEMANTIC INFORMATION NOT FOUND. ***/!!! AS TIMESTAMP(0)), PUBLIC.TO_INTERVAL_UDF(CAST(COLUMNA AS TIME(0)) !!!RESOLVE EWI!!! /*** SSC-EWI-0033 - FORMAT 'HHMISS' REMOVED, SEMANTIC INFORMATION NOT FOUND. ***/!!!))
    FROM
    TIMEDIFF;

Last updated